سؤال

بعد النقر على زر في تطبيق 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 10.0 nwd.ssdl".

تأكد من أن العملية الخاصة بك لديها الأذونات اللازمة على الملف وجميع المجلدات فوق الشجرة.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top