Json.NET Mono 程序集参考是什么?
What is the Json.NET Mono assembly reference?
我正在尝试编译这段 Json.NET 代码:
using Newtonsoft.Json;
...
MyDesc d = JsonConvert.DeserializeObject<MyDesc>(jsonInput);
...
通过单声道使用此命令(在 ubuntu 上):
$ mcs Main.cs -lib:/home/username/JsonNET/Net40/Newtonsoft.Json.dll
但我收到 "no assembly reference"-错误:
error CS0246: The type or namespace name `Newtonsoft' could not be found.
Are you missing an assembly reference
什么是正确的 Json.NET Mono assebmly 参考?
(-lib 选项看起来适合这个,但它不起作用 -lib:PATH1[,PATHn] Specifies the location of referenced assemblies
)
引用其他程序集的单声道编译器命令是-r:PATH/TO/ASSEMBLY
。你应该用当前版本的单声道试试这个。
$ mcs Main.cs -r:/home/username/JsonNET/Net40/Newtonsoft.Json.dll
参考:http://linux.die.net/man/1/mcs 或输入您的 shell:
$ man mcs
我正在尝试编译这段 Json.NET 代码:
using Newtonsoft.Json;
...
MyDesc d = JsonConvert.DeserializeObject<MyDesc>(jsonInput);
...
通过单声道使用此命令(在 ubuntu 上):
$ mcs Main.cs -lib:/home/username/JsonNET/Net40/Newtonsoft.Json.dll
但我收到 "no assembly reference"-错误:
error CS0246: The type or namespace name `Newtonsoft' could not be found.
Are you missing an assembly reference
什么是正确的 Json.NET Mono assebmly 参考?
(-lib 选项看起来适合这个,但它不起作用 -lib:PATH1[,PATHn] Specifies the location of referenced assemblies
)
引用其他程序集的单声道编译器命令是-r:PATH/TO/ASSEMBLY
。你应该用当前版本的单声道试试这个。
$ mcs Main.cs -r:/home/username/JsonNET/Net40/Newtonsoft.Json.dll
参考:http://linux.die.net/man/1/mcs 或输入您的 shell:
$ man mcs