Getting started with json.net – How to Install Json.Net in Visual Studio Projects

You can install Json.Net into your Visual Studio Project in 1 of 2 ways.

Install Json.Net using the Package Manager Console.

  1. Open the Package Manager Console window in Visual Studio either by typing package manager console in the Quick Launch box and selecting it

enter image description here

or by clicking View -> Other Windows -> Package Manager Console.

  1. Once the Package Manager Console is visible, select the project within your solution, into which you want to install Json.Net, by selecting it from the Default Project dropdown.

enter image description here

  1. Now type the following command and press enter.

Install-Package Newtonsoft.Json

  1. This will install the latest version of Json.Net. You will see the installation progress in the Package Manager Console. If successful, you will the message that it was successfully installed into your selected Project.

enter image description here

  1. Once installed successfully, you will now be able to see the Json.Net Assembly in the references in your selected Project. The name of the Json.Net assembly is Newtonsoft.Json

enter image description here

Json.Net is now ready for use in your project!

Install Json.Net using the Visual Studio Solution Explorer.

You can also install json.net using the Solution Explorer in Visual Studio.

  1. Right click the References node in your Project and click Manage Nuget Packages…

  2. In the Nuget Package Manager Dialog box, make sure Online is selected in the left pane. Type Json.Net in the search box in the top right. This will display the Json.Net Nuget Package in the search results pane in the middle.

  3. Click the Install button.

enter image description here

  1. You will see the installation progress in the progress window that will pop up.

enter image description here

  1. Once the installation is complete, you will see a green check-mark next to the Json.Net package in the Nuget Package Manager dialog box.

enter image description here

  1. You will also see the Newtonsoft.Json Assembly in the References node in your solution explorer for your selected project.

enter image description here

This completes the installation of Json.Net. You are now ready to use it in your project to perform various operations on json data.

if you want to reproduce, please indicate the source:
Getting started with json.net – How to Install Json.Net in Visual Studio Projects - CodeDay