views:

61

answers:

2

after clicking on button in asp.net application process.start() runs edmgen tool with arguments. And I catch error : alt text

var cs =ConfigurationManager.ConnectionStrings["ApplicationServices"].ConnectionString;

    string myArgs="/mode:fullgeneration /c:\""+cs+"\"  /project:nwd /entitycontainer:SchoolEntities /namespace:SchoolModel /language:CSharp ";
    string filename= GetFrameworkDirectory() + "\\EdmGen.exe";

    ProcessStartInfo startInfo = new ProcessStartInfo(filename,myArgs);
    startInfo.UseShellExecute = false;

    //startInfo.RedirectStandardError = true;
    Process myGenProcess = Process.Start(startInfo);

    //genInfo.Text = myGenProcess.StandardError.ReadToEnd();

How to fix this?

+2  A: 

You need to pass the full path to a folder that you have write access to for the output.

SLaks
I just added /outssdl:d:\"/generateEntityModel.ssdl\" and solve my problem. also I must add options /outmsl /outssdl /outobjectlayer /outviews. thanks.
loviji
A: 

Well the error indicates that you don't have access to "C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\nwd.ssdl".

Check that your process has the necessary permissions on the file and all the folders up the tree.

ChrisF
I haven't file nwd.ssdl in location C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0\. So I think it's trying to generate in runtime.
loviji
That's because you gave a relative path; it defaults to that folder.
SLaks