diff --git a/build_projects/dotnet-cli-build/ReplaceFileContents.cs b/build_projects/dotnet-cli-build/ReplaceFileContents.cs index 504175559..b0baf4179 100644 --- a/build_projects/dotnet-cli-build/ReplaceFileContents.cs +++ b/build_projects/dotnet-cli-build/ReplaceFileContents.cs @@ -3,6 +3,7 @@ using System; using System.IO; +using System.Text.RegularExpressions; using Microsoft.Build.Utilities; using Microsoft.Build.Framework; @@ -84,7 +85,8 @@ namespace Microsoft.DotNet.Cli.Build var replacementPattern = ReplacementPatterns[i].ItemSpec; var replacementString = ReplacementStrings[i].ItemSpec; - outText = outText.Replace(replacementPattern, replacementString); + var regex = new Regex(replacementPattern); + outText = regex.Replace(outText, replacementString); } return outText; diff --git a/src/redist/redist.csproj b/src/redist/redist.csproj index 2710a3973..c5a766bdd 100644 --- a/src/redist/redist.csproj +++ b/src/redist/redist.csproj @@ -264,4 +264,18 @@ + + + + $(PublishDir)/vstest.console.runtimeconfig.json + "version": ".*" + "version": "$(CLI_SharedFrameworkVersion)" + + +