C# 如何从CMD(Shell)编译测试类和实体Framework Model.Designer.cs
我使用C和实体框架4 我正在尝试在Windows中使用CMD Shell中的测试类 因此,我的工作文件夹包含一个Program.cs简单类,用于一些测试和EF Model.edmx 在Shell中,我在我的工作文件夹中工作,我正在使用此代码尝试编译Program.cs和Model.edmx 收到此错误时,请执行以下操作:C# 如何从CMD(Shell)编译测试类和实体Framework Model.Designer.cs,c#,entity-framework,shell,compiler-errors,cmd,C#,Entity Framework,Shell,Compiler Errors,Cmd,我使用C和实体框架4 我正在尝试在Windows中使用CMD Shell中的测试类 因此,我的工作文件夹包含一个Program.cs简单类,用于一些测试和EF Model.edmx 在Shell中,我在我的工作文件夹中工作,我正在使用此代码尝试编译Program.cs和Model.edmx 收到此错误时,请执行以下操作: Model.Designer.cs(11,19): error CS0234: The Type or name 'Objects does not exist in the
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?)'
我错过了什么?
谢谢你们的帮助
编辑:我在这里找到了一篇有用的文章:
使用MSBuild.exe解决了问题,但在我的问题中,我有兴趣使用csc.exe,我认为您忘记了引用System.Data.Entity.dll 可能您可以尝试以下命令:
csc *.cs /r:System.Data.Entity.dll
csc *.cs /r:System.Data.Entity.dll