I pasted the code from http://www.codeproject.com/Tips/789481/Bridging-the-Gap-between-Linqpad-and-Visual-Studio into Visual Studio 15. It tells me that 'Newtonsoft' could not be found. I open the folder "\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies" and found that the file Newtonsolft.Json.dll is already there. Could anyone tell me how to fixed problem?
-
Can u please add a screenshot of your references from Solution Explorer? – Amey Khadatkar Nov 04 '16 at 06:31
-
1have you added the NuGet package reference? https://www.nuget.org/packages/newtonsoft.json/ – Keith Hall Nov 04 '16 at 06:33
7 Answers
Solution Explorer->Right Click on Project Name -> Click on Manage Nuget Packages -> Search for newtonsoft -> Click on install button

- 25,472
- 25
- 109
- 197
-
12what if it is already installed and it cannot be uninstalled because it depend on other (to me unknown) .dlls ? – Muflix Jan 19 '17 at 11:38
-
1because i though new installation will resolve the problem, i updated the package but iam still getting the same error as asker – Muflix Jan 19 '17 at 12:00
-
1Do you have reference added for NewtonSoftJSon.dll in your project? – Vivek Nuna Jan 19 '17 at 12:02
Go to Tools -> Library Package Manager -> Package Manager Console
and in the console just write Install-Package Newtonsoft.Json -Version 9.0.1

- 13,723
- 6
- 34
- 69
For me I had the package already installed but it was missing the references and it could not be added.
Helped me: in NuGet
Package Manager to downgrade and upgrade Newtonsoft.Json

- 823
- 10
- 26

- 435
- 1
- 6
- 11
-
Oh man I wish I had seen this before I wasted a half a day on this. THANK YOU for this answer. – Casey Crookston Dec 12 '19 at 23:05
You have to get the correct NuGet package. From your link:
You can open the NuGet package manager in: Tools -> Nuget Packet Manager -> Manage Nuget Packages for Solution..

- 429
- 1
- 8
- 17
I had a similar problem and Google API's had a dependency on Newtonsoft.Json, not allowing me to uninstall Newtonsoft.Json and trying to reinstall.
Removing and and reinstalling Newtonsoft.Json will likely solve the problem, but in my situation, I had to go into Nuget Package Manager -> find Newtonsoft.Json -> select Options dropdown -> check "Force uninstall even if there are dependencies on it".
Checking that box allowed me to remove and subsequently reinstall Newtonsoft and the solution properly referenced it after.

- 83
- 1
- 1
- 5
I had the same problem with visual studio 2019. Simply restarting visual studio fixed the issue. After restarting, the References list in Solution Explorer did show the "Newtonsoft.json".

- 963
- 1
- 11
- 24
Right click on the client project side and select Manage NuGet packages. Then search for Newtonsoft.Json on browse and install. If the class you are trying to use Newtonsoft is in client you must install the package for the client.

- 35
- 3