2010-11-03 44 views
8

在C#/单声道下面的代码,使用System.Xml.Linq的单声道命令行编译器

using System.Xml.Linq; 

我得到这个错误。

 
error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml'. Are you missing an assembly reference? 

什么程序集引用我需要使用System.Xml.Linq与mono?

dmcs /r:???? main.cs 

回答

6

这将是:

dmcs -r:System.Xml.Linq.dll main.cs 
+0

这肯定存在的https:// github上

csharp -r:System.Xml.Linq.dll 

或者你可以从REPL本身加载该程序集的.com /单/单/树/主/ MCS /类/ System.Xml.Linq的/ – abatishchev 2010-11-03 15:28:43

3

我试图加载System.Xml.Linq的在CSharpRepl时收到了同样的错误。

您可以指定相同的命令行参数作为第一个答案:

csharp> LoadAssembly("System.Xml.Linq.dll"); 
csharp> using System.Xml.Linq;