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 Net6.0 on Net5.0

See original GitHub issue

Description

Paket is not resolving Microsoft.AspNetCore.Mvc.NewtonsoftJson according to the target framework. Its resolving to Net6.0 which is wrong.

error NU1202: Package Microsoft.AspNetCore.Mvc.NewtonsoftJson 6.0.0 is not compatible with net5.0 (.NETCoreApp,Version=v5.0). Package Microsoft.AspNetCore.Mvc.NewtonsoftJson 6.0.0 supports: net6.0 (.NETCoreApp,Version=v6.0)

Thanks

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:8

github_iconTop GitHub Comments

20reactions
prosconicommented, Mar 30, 2022

I would also like to say this is occurring to our team as well. So, bump!

2reactions
NightWatchmancommented, Dec 15, 2021

I’m having the same problem in one of my projects. framework: auto-detect is ignored, along with framework: 5.0. I also have a problem in this project where every time I run paket update it adds <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> to my csproj file, even if I have redirects: off in my paket.dependencies. That makes me wonder if there’s a deeper problem that’s causing the “ignoring framework restrictions” behavior and other undesired behavior.

I’ve tried cleaning, rebuilding, deleting obj and bin folders, deleting and reinstalling paket. Nothing seems to work and it keeps installing framework 6 packages into the framework 5 project. The only thing that fixes is it restricting the package versions in packet.dependencies and it’s a massive rabbit hole with the Microsoft packages trying to do all the transitive dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Microsoft.AspNetCore.Mvc.NewtonsoftJson 6.0.2 is not ...
Microsoft.AspNetCore.Mvc.NewtonsoftJson is a library that integrates Newtonsoft.Json with ASP.NET Core MVC so that it uses Newtonsoft.
Read more >
Microsoft.AspNetCore.Mvc.NewtonsoftJson 6.0.1
Version Downloads Last updated 8.0.0‑preview.7.23375.9 3,867 13 days ago 8.0.0‑preview.6.23329.11 4,596 a month ago 8.0.0‑preview.5.23302.2 3,346 2 months ago
Read more >
Microsoft.AspNetCore.Mvc.NewtonsoftJson Namespace
Provides types required to support Newtonsoft.Json based formatters. Classes. JsonSerializerSettingsProvider. Helper class which provides Newtonsoft.Json.
Read more >
MvcNewtonsoftJsonOptions Class
Configures the casing behavior of JSON serialization to use the member's casing for property names, properties of dynamic types, and dictionary keys. Applies...
Read more >
NewtonsoftJsonMvcBuilderExten...
Configures Newtonsoft.Json specific features such as input and output formatters.
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