0

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?

Community
  • 1
  • 1
loviji
  • 12,620
  • 17
  • 63
  • 94

2 Answers2

2

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

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • I just added /outssdl:d:\"/generateEntityModel.ssdl\" and solve my problem. also I must add options /outmsl /outssdl /outobjectlayer /outviews. thanks. – loviji Apr 25 '10 at 20:12
0

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
  • 134,786
  • 31
  • 255
  • 325
  • 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 Apr 25 '10 at 20:14
  • That's because you gave a relative path; it defaults to that folder. – SLaks Apr 25 '10 at 20:15