Avoid unnecessary or duplicate PackageReferences - 7.0 Preview4 SDK work#69260
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
|
Is the linker failure related? |
|
Nope, that's an msbuild issue that we have seen in other PRs as well lately. |
|
I had an earlier approval from Carlos, I think this is save to merge. Unblock devs who currently use a P4 SDK to restore, build and test runtime. |
am11
left a comment
There was a problem hiding this comment.
Two questions/comemnts related to Newtonsoft.Json. :)
| <!-- | ||
| Microsoft.Net.Test.Sdk has a dependency on Newtonsoft.Json v9.0.1. We upgrade the dependency version | ||
| with the one used in libraries to have a consistent set of dependency versions. Additionally this works | ||
| around a dupliate type between System.Runtime.Serialization.Formatters and Newtonsoft.Json. | ||
| --> |
There was a problem hiding this comment.
Is this comment still relevant? Going by the dependency graph over at https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/, only UAP has dependency on Newtonsoft.Json. UAP support in libraries was dropped in dotnet/corefx#41759.
There was a problem hiding this comment.
The dependency is still there. Just click through the netcoreapp dependencies and you will find newtonsoft.json.
| with the one used in libraries to have a consistent set of dependency versions. Additionally this works | ||
| around a dupliate type between System.Runtime.Serialization.Formatters and Newtonsoft.Json. | ||
| --> | ||
| <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" /> |
There was a problem hiding this comment.
Some (non-shipping) test projects under installers have hardcoded version of Newtonsoft.Json https://grep.app/search?q=Newtonsoft.Json&case=true&filter[repo][0]=dotnet/runtime&filter[path.pattern][0]=src/installer&filter[lang][0]=XML Can we use NewtonsoftJsonVersion for them as well?
There was a problem hiding this comment.
Yes that dependency Version should be bumped or the dependency dropped entirely in favor of STJ
The 7.0 Preview4 SDK contains a recent NuGet change that warns when duplicate PackageReferences items are declared. Fixing the occurrences that I found offline.