Runtime: source-build: Remove Newtonsoft.Json prebuilt

Created on 20 Jun 2019  路  8Comments  路  Source: dotnet/runtime

Newtonsoft.Json | 9.0.1
-- | --

https://github.com/dotnet/source-build/issues/885

area-DependencyModel donotuse_Triaged

Most helpful comment

See also https://github.com/dotnet/core-setup/issues/5045, which discusses removing TFMs lower than netstandard2.0.

All 8 comments

Based on some prebuilt report lines you gave me, this appears to be ref-only.

Version is hard-coded when building DependencyModel (I don't think has to change for ref-only (?)):

https://github.com/dotnet/core-setup/blob/8d023a6fea7824648ea860f6ba05d236a1641d54/src/managed/Microsoft.Extensions.DependencyModel/Microsoft.Extensions.DependencyModel.csproj#L45

The local build task reference seems to be transitive rather than direct.

I'm not sure about this.

@crummel, any comments?

This is what I saw in project annotated-usage:

<AnnotatedUsage Id="Newtonsoft.Json" Version="9.0.1" File="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/bin/obj/rhel.7-x64.Debug/core-setup.tasks/project.assets.json" Project="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/" SourceBuildPackageIdCreator="newtonsoft-json NewtonsoftJsonPackageVersion/12.0.2" />

  <AnnotatedUsage Id="Newtonsoft.Json" Version="9.0.1" File="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/bin/obj/rhel.7-x64.Release/Microsoft.Extensions.DependencyModel/project.assets.json" IsDirectDependency="true" Project="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/" SourceBuildPackageIdCreator="newtonsoft-json NewtonsoftJsonPackageVersion/12.0.2" />

  <AnnotatedUsage Id="Newtonsoft.Json" Version="9.0.1" File="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/bin/obj/rhel.7-x64.Release/core-setup.tasks/project.assets.json" Project="bin/src/core-setup.61f30f5a23af498908cadd9cc282d4d67d71f522/" SourceBuildPackageIdCreator="newtonsoft-json NewtonsoftJsonPackageVersion/12.0.2" />

Yeah, what Davis says seems accurate. @dseefeld - would we do ref-only Newtonsoft.Json packages? Otherwise from the comment in DependencyModel.csproj it sounds like core-setup could upgrade after the SDK does?

We can add Newtonsoft.Json 9.0.1 as a ref pkg, but it needs to be ref-only for all usages of that package.

So we can't do it yet, but once NuGet and the SDK update we should be able to. Or it sounds like core-setup could upgrade at that point.

+@eerhardt, some source-build discussion about the Newtonsoft.Json 9.0.1 dependency Microsoft.Extensions.DependencyModel has when building for non-netstandard2.0 TFMs.

See also https://github.com/dotnet/core-setup/issues/5045, which discusses removing TFMs lower than netstandard2.0.

Closing since this was addressed by source-build.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesqo picture jamesqo  路  3Comments

GitAntoinee picture GitAntoinee  路  3Comments

jzabroski picture jzabroski  路  3Comments

bencz picture bencz  路  3Comments

omajid picture omajid  路  3Comments