Fix up runtimeconfig.json files for tools (dotnet, MSBuild, VSTest, etc) to target .NET Core 3.0

This commit is contained in:
Daniel Plaisted 2018-07-06 17:56:42 -07:00
parent ec9914424c
commit b3be19b820

View file

@ -25,7 +25,7 @@
PublishDotnetTools;
PublishVersionFile;
PublishAppHostTemplate;
RetargetVSTestConsole;
RetargetTools;
GenerateMSBuildExtensions"
AfterTargets="Publish" />
@ -258,15 +258,17 @@
DependsOnTargets="GetNuGetPackagesArchive">
</Target>
<Target Name="RetargetVSTestConsole">
<Target Name="RetargetTools">
<PropertyGroup>
<VSTestRuntimeConfigPath>$(PublishDir)/vstest.console.runtimeconfig.json</VSTestRuntimeConfigPath>
<ReplacementPattern>"version": ".*"</ReplacementPattern>
<ReplacementString>"version": "$(MicrosoftNETCoreAppPackageVersion)"</ReplacementString>
</PropertyGroup>
<ItemGroup>
<ToolRuntimeConfigPath Include="$(PublishDir)/**/*.runtimeconfig.json" />
</ItemGroup>
<ReplaceFileContents
InputFiles="$(VSTestRuntimeConfigPath)"
DestinationFiles="$(VSTestRuntimeConfigPath)"
InputFiles="@(ToolRuntimeConfigPath)"
DestinationFiles="@(ToolRuntimeConfigPath)"
ReplacementPatterns="$(ReplacementPattern)"
ReplacementStrings="$(ReplacementString)" />
</Target>