我有数据层,业务层和设计层,我的.edmx文件放在数据层中。 现在我想为我的.edmx文件生成视图以提高性能。 我尝试以下过程: - >设置.edmx文件的元Artiface处理属性设置为“复制到输出目录” ,然后在我的数据层的生成事件,我把下面的代码:如何为edmx生成视图以提高性能?
"%windir%\Microsoft.NET\Framework\v4.0.30319\EdmGen.exe" /nologo /language:CSharp
/mode:ViewGeneration“/inssdl:$(TargetDir)NeoSoftDataEntity.ssdl” “/incsdl:$(TargetDir)NeoSoftDataEntity.csdl”“/inmsl:$(TargetDir)NeoSoftDataEntity.msl” “/ outviews:$(ProjectDir )NeoSoftDataEntity.Views.cs“ 但构建解决方案时。 我收到以下错误: * 错误2命令“”%windir%\ Microsoft.NET \ Framework \ v4.0.30319 \ EdmGen.exe“/ nologo/language:CSharp /mode:ViewGeneration”/ inssdl: D:\ NeoSoftWinApp \ NeoSoftWinApp \ bin \ Debug \ NeoSoftDataEntity.ssdl“ ”/incsdl:D:\NeoSoftWinApp\NeoSoftWinApp\bin\Debug\NeoSoftDataEntity.csdl“”/ inmsl:D:\ NeoSoftWinApp \ NeoSoftWinApp \ bin \ Debug \ NeoSoftDataEntity.msl “ ”/outviews:D:\NeoSoftWinApp\NeoSoftWinApp\NeoSoftDataEntity.Views.cs“” 退出,代码为123 NeoSoftWinApp *
如何解决这个问题呢?
这些路径是D:\ NeoSoftWinApp \ NeoSoftWinApp \ bin \ Debug \ NeoSoftDataEntity.ssdl是否正确?如果工件没有被复制到输出目录,而是住在项目目录中,则可能需要使用“/incsdl:$(ProjectDir)NeoSoftDataEntity.csdl”而不是“/incsdl:$(TargetDir)NeoSoftDataEntity.csdl” – Pawel 2012-04-12 03:32:53