我使用C#和Entity Framework 4。
我正在尝试使用Windows中CMD(Shell)的测试类。
因此,我的工作文件夹包含Program.cs
(某些测试的简单类)和EF Model.edmx
。
在Shell中,我在工作文件夹中工作,并且正在使用此代码尝试compile both Program.cs and Model.edmx
csc /define:DEBUG /optimize /out:File2.exe *.cs
Model.Designer.cs(11,19): error CS0234: The Type or name 'Objects does not exist in the namespace 'Syste.Data' (are you missing an assembly reference?)'
最佳答案
我认为您忘记了引用System.Data.Entity.dll
可能是您可以尝试以下命令:
csc *.cs /r:System.Data.Entity.dll
关于c# - 如何从CMD(Shell)编译测试类和 Entity Framework Model.Designer.cs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6855023/