How can I fix assembly version conflicts with JSON.NET after updating NuGet package references in a new ASP.NET MVC 5 project?

后端 未结 11 1621
粉色の甜心
粉色の甜心 2020-11-29 20:42

I created a new ASP.NET MVC 5 web project in VS 2013 (Update 1) then updated all NuGet packages. When I build the project, I get the following warning:

<
11条回答
  •  孤独总比滥情好
    2020-11-29 21:18

    Here the steps I used to fix the warning:

    • Unload project in VS
    • Edit .csproj file
    • Search for all references to Newtonsoft.Json assembly
      • Found two, one to v6 and one to v5
      • Replace the reference to v5 with v6
    • Reload project
    • Build and notice assembly reference failure
    • View References and see that there are now two to Newtonsoft.Json. Remove the one that's failing to resolve.
    • Rebuild - no warnings

提交回复
热议问题