Search code examples
c#json.netnugetclickonceglobal-assembly-cache

Upgrading to Json.NET 7.0.1 results in installation error


I use Json.NET in one of my projects and its working fine as it is. But i just recently wanted to update the rather outdated version 4.5.9 to the current version 7.0.1. you know... just for the sake of being up to date.

I installed version 4.5.9 via NuGet and just used the update function.

After the next deploy (i deploy via Visual Studio 2012 build-in clickonce) my client pc gets the "XXX needs to be installed in the global assembly chache" error in which it is referencing to the Newtonsoft.Json DLL.

I have no idea why or how to fix this error. I already set everything regarding Json.NET to include and required in the Application Files dialog of the Publish settings. This did not fix it.

Uninstalling 7.0.1 and reinstalling 4.5.9 (all via Nuget) however fixes the error.

Why can't i deploy the 7.0.1 Version without this error?

Thank you for your attention.


Solution

  • Okay. Here is finally the answer to this Question:

    In my project i referenced a library which referenced Json.NET 4.5.9. Somehow this makes problems.

    The solution was to update to the newest Json.NET in this library as well as in my solution.

    Now it works perfectly fine.