question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft.AspNetCore.Mvc.NewtonsoftJson: package update info wrong for .NET Core 3.1

See original GitHub issue

Hi there,

I have a C# solution which uses the Microsoft.AspNetCore.Mvc.NewtonsoftJson package. Unfortunately since the release of .NET 5, both Rider and Visual Studio try to update it in my .NET Core 3.1 projects to v5.0.1 which fails.

The root problem can reproduced by running the command dotnet list package --outdated and observing the output:

Project `X` has the following updates to its packages
   [netcoreapp3.1]: 
   Top-level Package                              Requested   Resolved   Latest
   > Microsoft.AspNetCore.Mvc.NewtonsoftJson      3.1.10      3.1.10     5.0.1

I guess some meta-data need fixing somewhere?

BR, Mark

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
markm77commented, Dec 26, 2020

But we don’t want it to support multiple frameworks. We want it to support 5.0 only, which is what it currently does. I’m not sure why that shows as an updated to an app targeting 3.1.

That’s what I thought. And I can confirm if the update is attempted it fails on a .NET 3.1 project.

The problem is NuGet keeps suggesting the incorrect update. It does so in Rider, Visual Studio and on the command line. And then when you attempt the update it fails.

0reactions
Pilchiecommented, Dec 30, 2020

This issue was moved to NuGet/Home#10419

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.AspNetCore.Mvc.NewtonsoftJson: package ...
Mvc.NewtonsoftJson: package update info wrong for .NET Core 3.1 # ... NET Core 3.1 to .NET 5. The issue is the package Microsoft.AspNetCore....
Read more >
c# - Microsoft.AspNetCore.Mvc.NewtonsoftJson 6.0.2 is not ...
It seems you've misstated in your question what you're installing. The package you're actually installing is not Newtonsoft.Json, but rather ...
Read more >
NETSDK1079: The Microsoft.AspNetCore.All package is ...
NET Core SDK 3.1.100 and later versions. You may receive this error message when: You retarget an ASP.NET Core project from .NET Core...
Read more >
Migrate from ASP.NET Core 2.2 to 3.0
This article explains how to update an existing ASP.NET Core 2.2 project to ASP.NET Core 3.0. It might be helpful to create a...
Read more >
Why am I getting 'Unable to find package Microsoft. ...
I am running Visual Studio 2019 and trying to develop a .NET Core 3,1 ASP MVC application. I was working just fine yesterday...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found