diff --git a/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs b/src/Microsoft.DotNet.Arcade.Sdk/src/GenerateSourcePackageSourceLinkTargetsFile.cs index de64492076d2..60172ff10b07 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.EscapeUriString(relativePathToSourceRoot.Replace('\\', '/')) + "*"); + var contentFilesSourceLinkUrl = innerMostRootSourceLinkUrl.Replace("*", Uri.EscapeDataString(relativePathToSourceRoot.Replace('\\', '/')) + "*"); return GetTargetsFileContent(PackageId, contentFilesSourceLinkUrl); }