[build] Update Microsoft.* NuGet package versions #1055
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[build] Update Microsoft.* NuGet package versions
Context: c936d09
Context: https://devdiv.visualstudio.com/DevDiv/_componentGovernance/112825/alert/7082457?typeId=12393424
Component Governance is a Microsoft internal tool which checks
for known security issues in product dependencies. It is currently
reporting a defect in Java.Interop because of Newtonsoft.Json 9.0.1
and GHSA-5crp-9r3c-p9vr. This is a tad odd because Java.Interop
does not use Newtonsoft.Json.
Apparently the Microsoft.NET.Test.Sdk 16.11.0 package pulls in
Newtonsoft.Json 9.0.1 when
$(TargetFramework)=UAP10.0, which isalso something that Java.Interop does not use.
Regardless! Take this as a reminder and opportunity to update some
NuGet packages. Update all of the
Microsoft.*NuGet packagesexcept
Microsoft.Xml.SgmlReader; as mentioned in c936d09, newerversions of that package have an API break, which prevent us from
trivially bumping the dependency.
Most other
Microsoft.*NuGet packages are updated to the latestnon-preview versions listed on NuGet.org and available on
dotnet-public.
Microsoft.NET.Test.Sdkis updated to the preview version17.5.0-preview-20221003-04, because the current stable 17.3.2
version still references Newtonsoft.Json 9.0.1 for UAP10.0! 🙃
I have also sorted the
Microsoft.*entries inDirectory.Build.targets.One oddity: updating the
Microsoft.NET.Test.SdkNuGet package toanything after 17.4.0-preview-20220726-02 results in a CS0017!
This is because
Hello-Java.Base.csprojreferencesTestJVM.csproj, which referencesMicrosoft.NET.Test.Sdk, andmore recent versions of the
Microsoft.NET.Test.Sdkpackage containbuildTransitive/netcoreapp3.1/Microsoft.NET.Test.Sdk.Program.cs,which contains a
Main()method!I am not at all sure why this was done.
Prevent the CS0017 by setting the
$(StartupObject)MSBuildproperty to
Hello.App.