Search code examples
.net-core-2.0rider

Unable to resolve Newtonsoft.Json in dotnet core 2 project in rider IDE


I am using Rider IDE on Ubuntu 16.04, and have created a simple class library project using the Rider IDE wizard (invoked by using File | New | Class Library ) The IDE auto generate a Class.cs file, to which I added an include. The file looks like this:

using System;
using Newtonsoft.Json;

namespace ClassLibrary
{
    public class Class1
    {
    }
}

However, the IDE tags the line as an error, stating that it "Cannot resolve symbol Newtonsoft".

However, the Newget windows does show Newtonsoft.Json as being available as shown in the screenshot.

Is there supposed to be another place where this is configured?

Newtonsoft error in Rider IDE


Solution

  • There is no the package in your solution, only .net standard library. Nuget window suggest you to install 'Newtonsoft.Json' package, see section name - 'Available packages'.