0

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?

Sagar Savsani
  • 25
  • 3
  • 11
  • 1
    Are these paths D:\NeoSoftWinApp\NeoSoftWinApp\bin\Debug\NeoSoftDataEntity.ssdl correct? If the artifacts are not copied to the output directory but live in the project directory you may want to use "/incsdl:$(ProjectDir)NeoSoftDataEntity.csdl" instead of "/incsdl:$(TargetDir)NeoSoftDataEntity.csdl" – Pawel Apr 12 '12 at 03:32

1 Answers1

1

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"
Guish
  • 4,968
  • 1
  • 37
  • 39