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?
Solution Explorer->Right Click on Project Name -> Click on Manage Nuget Packages -> Search for newtonsoft -> Click on install button
Go to Tools -> Library Package Manager -> Package Manager Console
and in the console just write Install-Package Newtonsoft.Json -Version 9.0.1
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
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..
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.
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".
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.
In case if answers above didn't help you, try to remove the links to Newtonsoft
from your .csproj
files, for me it helped.
Before this I tried to remove packages
folder, tried to remove .nuget
cache, remove and install Newtonsoft with --force
flag as it is described above but nothing helped for me. Removing from .csproj and reinstalling helped me. I am using VS Community 2022.
© 2022 - 2024 — McMap. All rights reserved.