Reputation: 25
i have data layer,business layer and design layer,in which my .edmx file is placed in data layer. now i want to generate views for my .edmx file to improve performance. i tried the following process: ->set .edmx file's Metadata Artiface Processing property to "Copy to Output Directory" and then in my data layer's build event i put the following code:
"%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" but when build the solution. i get the following error: *Error 2 The command ""%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"" exited with code 123. NeoSoftWinApp *
how to resolve this problem?
Upvotes: 0
Views: 1279
Reputation: 5160
If you copy/paste from the MSDN site, you need to remove the carriage return in your command.
"%windir%\Microsoft.NET\Framework\v4.0.30319\EdmGen.exe" /nologo /language:CSharp /mode:ViewGeneration "/inssdl:$(TargetDir)MyModel.ssdl" "/incsdl:$(TargetDir)MyModel.csdl" "/inmsl:$(TargetDir)MyModel.msl" "/outviews:$(ProjectDir)MyModel.Views.cs"
Upvotes: 1