質問

ASP.NETアプリケーションでボタンをクリックした後 process.start() edmgenツールを引数で実行します。そして、私はエラーをキャッチします: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();

これを修正する方法は?

役に立ちましたか?

解決

出力用に書き込みアクセスできるフォルダーにフルパスを渡す必要があります。

他のヒント

さて、このエラーは、「c: program files common files microsoft shared devserver devserver nwd.ssdl」にアクセスできないことを示しています。

プロセスがファイルに必要なアクセス許可があり、すべてのフォルダーがツリーの上にあることを確認してください。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top