I just installed the Json.Net package and now I am wondering how I can import this to my project? I first tried "using Newtonsoft.Json;" but that's not coming up. I tried looking for it by adding a reference to my project first but I can't find it the list either? I also can't seem to find anyone else with this problem or any directions doing a few quick Google searches. Please tell me how easy this is to do...
4 Answers
right click on your project and select "manage nuget package". put json into the search, find it in the list and click "install"

- 21,690
- 12
- 62
- 94
-
1That's it... I had this dialog box up plenty of times and seen a list of packages I installed already but didn't think it was project specific. I thought it would just reinstall the package to Visual Studio again. Thanks for the help. – Shane LeBlanc Feb 20 '12 at 19:25
-
1you can also right click on the solution and manage packaes for all projects in the solution – Antony Scott Feb 20 '12 at 19:27
If you are doing this manually, right click on the "Reference" folder in your project's solution tree. Choose "Add Reference" -> "Browse" tab, locate Newtonsoft.Json.dll on your computer(You have to download this from the internet first) and add it as a reference to your project.
If you are using NuGet, right click on the "Reference" folder in your project's solution tree and choose "Manage NuGet Packages", pick the "Online" tab, search for Json.Net and click "install".

- 5,769
- 2
- 24
- 37
-
1Thanks! This is a better answer as it describes a working alternative to NuGet. – daniel-cheng Apr 07 '15 at 19:40
-
I did it and I include the using, but it keep saying "missing reference" – Leandro Bardelli Dec 18 '15 at 20:41
-
1I response myself: what you need to copy is the exact version of the dll to the framework that you use. I referenced 4.5 dll when my framework is 4, that was the mistake – Leandro Bardelli Dec 18 '15 at 20:51
-
Further to Leandro's comment, if you download the latest zip file from https://github.com/JamesNK/Newtonsoft.Json/releases it will have several versions of Newtosoft.Json.dll for different versions of .NET. – Simon Elms Jun 30 '16 at 00:03
Right click on your project in solution explorer and select "manage nuget packages", then click Online in the navigation bar, type newtonsoft into the search bar, find it in the list and click "install"

- 4,998
- 41
- 44
Check to see if the Json.net is already install in your project.
If it is already installed go and remove the "package" entry from "packages.config" file. Now go to NuGet "Package Manager Console" and install the new package using the following command:
PM> Install-Package Newtonsoft.Json {Your Project Name} 6.0.3 nuget.org
If it is not installed, go to NuGet and search for JSon.Net and select the project and click install.

- 24,161
- 21
- 159
- 240

- 21
- 2