I'm trying to start using JSON.NET for Mono on Linux and MonoDevelop. I found the packages in the repository, so I installed them using sudo apt-get install libnewtonsoft-json-cil-dev libnewtonsoft-json-cil monodoc-newtonsoft-json-manual
I have the following code to test if the installation worked:
using System;
using Gtk;
using Newtonsoft.Json;
namespace jsontest
{
class MainClass
{
public static void Main (string[] args)
{
Application.Init ();
Car my_car = new Car ();
string json = JsonConvert.SerializeObject (my_car);
MainWindow win = new MainWindow ();
win.Show ();
Application.Run ();
}
}
public class Car
{
public string make;
public string model;
public Car()
{
make = "ford";
model = "jalopy";
}
}
}
When I try to run the program it gives me the following error: The type or namespace name 'Newtonsoft' could not be found. Are you missing an assembly reference?
Why can't MonoDevelop find the library I installed?