diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs index 60172ff10b0..de64492076d 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs +++ b/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs @@ -89,7 +89,7 @@ internal string GetOutputFileContent() } var relativePathToSourceRoot = projectDir.Substring(innerMostRootItemSpec.Length); - var contentFilesSourceLinkUrl = innerMostRootSourceLinkUrl.Replace("*", Uri.EscapeDataString(relativePathToSourceRoot.Replace('\\', '/')) + "*"); + var contentFilesSourceLinkUrl = innerMostRootSourceLinkUrl.Replace("*", Uri.EscapeUriString(relativePathToSourceRoot.Replace('\\', '/')) + "*"); return GetTargetsFileContent(PackageId, contentFilesSourceLinkUrl); }