Json.NET & C# – Installing Json.NET for C# projects in Visual Studio 2015

Published on February 13, 2016 by abundantcode

Filed under Json.NET

Last modified February 13, 2016

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 2626 times

Json.NET is one of the popular high performance and open source JSON framework for the .NET Developers.

It lets the developers to serialize and deserialize .NET objects and is considered to be one of the most popular .NET library. The first version of Json.NET was released sometime in June 2006 and now this library is used is most of the popular .NET open source projects like Mono , RavebDB , ASP.NET SignalR , ASP.NET Web API , Microsoft HTTP service framework etc.

Json.NET is currently supported in most of the project types in Visual Studio 2015 which includes .NET 2, .NET 3.5, .NET 4, .NET 4.5, Silverlight, Windows Phone and Windows 8 Store App,Universal Windows Platform applications etc.

How to Install Json.NET for your C# projects in Visual Studio 2015 ?

Installing Json.NET for your C# project in Visual Studio 2015 is pretty easier.  You can install it from the NuGet package.

To install Json.NET in Visual Studio 2015 for C# projects , follow the below steps .

1. Open your C# project (Eg : Console Application here) in Visual Studio 2015 .

2. In Visual Studio IDE , Navigate to Tools –> NuGet Package Manager –> Package Manager Console.


3. In the Package Manager Console Window , enter the following command and press the enter key.

Install-Package Newtonsoft.Json


With in few minutes , you will see the Newtonsoft.Json library be downloaded and installed in your project and you will be displayed a message in the Package Manager console similar to this .

Successfully installed ‘Newtonsoft.Json 8.0.2’ to ACConsoleCSharp

You will also be shown the webpage of the Json.NET within Visual Studio 2015 showing the version of Json.NET installed in your project.


4. To confirm if the Json.NET in installed in your project , you can open the solution explorer of your project in Visual Studio and expand the references folder to see the list of dll’s referred in the project. You should see Newtonsoft.Json here.


5. Additionally , open the packages.config file from solution explorer to see the following content.

<?xml version="1.0" encoding="utf-8"?>
  <package id="Newtonsoft.Json" version="8.0.2" targetFramework="net45" />

This indicates the Newtonsoft.Json version that is installed and the target framework.

6. Build the project and start using the Json.NET in your project.

Watch out for the other articles on Json.NET and how you can use it in your C# projects at abundantcode.com

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


You might be Interested in these Posts

How to use array Rank in C# ?

In C# , the Rank property of the array is is used to get the rank of the array. In simple terms , ra...

How to get the CommandLine of the Current Application in C# ?

You might need to get the information that contains the commandline which is used to execute the cur...

How to read a connection string from web.config file in ASP.NET ?

Assume that you have a connectionstring configured in the web.config file of your ASP.NET applicatio...