4

I'm using Visual Studio(VS) 2010 Ultimate (with .NET 4.0) to install Json.NET (10.0.2) but get failed with error message:

'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'

I've tried to search solution for this and tried many ways like: update NuGet Package. but unfortunately, it didn't work. What is to be done?

More tried update:

  • The version of NuGet Package: 2.8.60318.667
  • Install Json.net version: 9.0.1 without problem

2 Answers 2

1

I tried this solution and it worked for me:

  • Tool -> NuGet Packages Manager - Manage Nuget Package for Solution

  • Select Online tab and search online for Nuget.CommandLine -> install it

  • After installing, you can find nuget.exe in your Current Project folder -> Packages -> NuGet.CommandlineXXX
  • Run CMD and use command install to install latest version of Json.NET
  • Back to Project -> add reference - Browse for DLL file

Done!

Sign up to request clarification or add additional context in comments.

Comments

0

Please check the version of .NET Framework you are using. There are chances that previous frameworks such as v3.5 or below doesn't support latest version of JSON.

Or this would help you : NuGet: 'X' already has a dependency defined for 'Y'

5 Comments

Which version of NuGet are you using? Here are steps to check : learn.microsoft.com/en-us/nuget/policies/…
Name : Package Manager Host Version : 2.8.60318.667 InstanceId : 3d141890-c5fa-4574-b12d-5f874451178b UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-US CurrentUICulture : en-US PrivateData : NuGetConsole.Host.PowerShell.Implementation.NuGetPSHost+Commander DebuggerEnabled : True IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace
My buddy was facing same problem, please try uninstalling current JSON version and reinstall updated version. It worked for him. *Please make sure you do this for a separate dummy project first, if it works then try it for your project.
I did uninstall old version and install latest one but no luck
I am out of options mate !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.