Rewrite testhost.json

This commit is contained in:
Jakub Jareš 2024-04-05 12:52:51 +02:00
parent 614fd28fba
commit 6bc4c2adf8

View file

@ -481,6 +481,29 @@
Overwrite="true" /> Overwrite="true" />
</Target> </Target>
<Target Name="FixNewtonsoftInTesthostDepsJson" >
<!-- Patch version of Newtonsoft.Json in testhost.deps.json, because it is picked up by
compliance checking scripts as a false-positive vulnerability. -->
<ItemGroup>
<NewtonSoftJsonVersionReplacement Include="%22Newtonsoft.Json%22: %2213.0.0.0%22">
<ReplacementString>"Newtonsoft.Json": "13.0.1.0"</ReplacementString>
</NewtonSoftJsonVersionReplacement>
<NewtonSoftJsonVersionReplacement Include="Newtonsoft.Json/13.0.0.0">
<ReplacementString>Newtonsoft.Json/13.0.1.0</ReplacementString>
</NewtonSoftJsonVersionReplacement>
</ItemGroup>
<ItemGroup>
<TestHostDepsJsonPath Include="$(OutputPath)/**/testhost.deps.json" />
</ItemGroup>
<ReplaceFileContents
InputFiles="@(TestHostDepsJsonPath)"
DestinationFiles="@(TestHostDepsJsonPath)"
ReplacementItems="@(NewtonSoftJsonVersionReplacement)" />
</Target>
<Target Name="CopyIncludedWorkloadManifestFile" > <Target Name="CopyIncludedWorkloadManifestFile" >
<ItemGroup> <ItemGroup>
@ -573,6 +596,7 @@
LayoutWorkloadUserLocalMarker; LayoutWorkloadUserLocalMarker;
LayoutBundledTools; LayoutBundledTools;
RetargetTools; RetargetTools;
FixNewtonsoftInTesthostDepsJson;
CrossgenLayout; CrossgenLayout;
LayoutAppHostTemplate; LayoutAppHostTemplate;
GeneratePrecomputedRarCache; GeneratePrecomputedRarCache;