Skip to content

Add references to newtonsoft.json for transitive version pinning#10126

Merged
AlitzelMendez merged 2 commits intodotnet:mainfrom
riarenas:riarenas/newtonsoft-everywhere
Jul 25, 2022
Merged

Add references to newtonsoft.json for transitive version pinning#10126
AlitzelMendez merged 2 commits intodotnet:mainfrom
riarenas:riarenas/newtonsoft-everywhere

Conversation

@riarenas
Copy link
Contributor

@riarenas riarenas commented Jul 22, 2022

part of #10101

Adds references to newtonsoft.json everywhere we need to control transitive pinning.

Running https://dev.azure.com/dnceng/internal/_build/results?buildId=1898566&view=results to see what CG thinks of these changes and whether they are enough.

A lot of the older versions we get through msbuild, which seems like too big of a dependency to just update everywhere, which makes me think the direct references are the best way to go to get this sorted.

To double check:

@riarenas riarenas requested review from MattGal and garath July 22, 2022 21:19
@riarenas
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@riarenas
Copy link
Contributor Author

@riarenas
Copy link
Contributor Author

latest test build is finding some references to 9.0.1 that I can't quite track

@riarenas
Copy link
Contributor Author

I think the last few references are coming from the test sdk. There's a newer version uploaded to solve their own newtonsoft dependency issues: https://www.nuget.org/packages/Microsoft.NET.Test.Sdk/17.4.0-preview-20220707-01#dependencies-body-tab

Upgrading from our current version means we'll have to update some other dependencies, (or make sure to add newtonsoft references to every test project in the repo) so that might be better left as a separate PR.

\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605: Detected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly
from the project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605:  Microsoft.DotNet.VersionTools.Tasks.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.Test
Platform.TestHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.
Frameworks (>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.VersionTools.Tasks.Tests\Microsoft.DotNet.VersionTools.Tasks.Tests.csproj : error NU
1605:  Microsoft.DotNet.VersionTools.Tasks.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sl
n]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605: De
tected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly from the
 project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605:  M
icrosoft.DotNet.SourceBuild.Tasks.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.
TestHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.Framework
s (>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.SourceBuild\tests\Microsoft.DotNet.SourceBuild.Tasks.Tests.csproj : error NU1605:  M
icrosoft.DotNet.SourceBuild.Tasks.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605: De
tected package downgrade: NuGet.Frameworks from 5.11.0 to 5.6.0-preview.2.6489. Reference the package directly from the
 project to select a different version.  [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605:  M
icrosoft.DotNet.PackageTesting.Tests -> Microsoft.NET.Test.Sdk 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.Tes
tHost 17.4.0-preview-20220707-01 -> Microsoft.TestPlatform.ObjectModel 17.4.0-preview-20220707-01 -> NuGet.Frameworks (
>= 5.11.0)  [\Arcade.sln]
\src\Microsoft.DotNet.PackageTesting.Tests\Microsoft.DotNet.PackageTesting.Tests.csproj : error NU1605:  M
icrosoft.DotNet.PackageTesting.Tests -> NuGet.Frameworks (>= 5.6.0-preview.2.6489) [\Arcade.sln]
    0 Warning(s)
    3 Error(s)

Copy link
Member

@MattGal MattGal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I assume you've built locally and checked out the package cache too?

@AlitzelMendez
Copy link
Member

I talked with Ricardo and I am going to merge this pr to handle the other alerts in other pr

@AlitzelMendez AlitzelMendez merged commit 5d3e421 into dotnet:main Jul 25, 2022
am11 pushed a commit to am11/arcade that referenced this pull request Jul 26, 2022
…net#10126)

* Add references to newtonsoft.json for transitive version pinning

* but wait.. there's more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants