简体   繁体   English

Process.Start()edmgen

[英]Process.Start() edmgen

after clicking on button in asp.net application process.start() runs edmgen tool with arguments. 在asp.net应用程序中单击按钮后, process.start()将运行带有参数的edmgen工具。 And I catch error : 我发现错误: 替代文字

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? 如何解决这个问题?

您需要将完整路径传递到对输出具有写访问权的文件夹。

Well the error indicates that you don't have access to "C:\\Program Files\\Common Files\\Microsoft Shared\\DevServer\\10.0\\nwd.ssdl". 错误消息表明您无权访问“ 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. 检查您的进程对文件和树上的所有文件夹都具有必需的权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM