我正在尝试使用c#dotnet执行MSdeploy.exe,当我运行代码时,我在主模块下遇到异常,说32位进程无法访问64位进程的模块。
下面是代码:
string temp = @"C:\Projects\AUTODEPLOY\IIS\AppUAT";
string sourcePackageLocation = @"C:\Projects\AUTODEPLOY\SERVERS\UAT\WATCH\Test.zip";
ProcessStartInfo startInfo = new ProcessStartInfo();
// Use ProcessStartInfo class
startInfo.CreateNoWindow = false;
startInfo.UseShellExecute = false;
startInfo.FileName = msDeployPath;
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
startInfo.Arguments = "-verb:sync -source:contentPath=" + temp + " -dest:package:" + sourcePackageLocation + "";
try
{
using (Process exeProcess = Process.Start(startInfo))
{
exeProcess.WaitForExit();
exitCode = exeProcess.ExitCode;
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine("Deploy Failed");
}
发生错误是:
{“32位进程无法访问64位模块 进程。“} System.Runtime.InteropServices.ExternalException {System.ComponentModel.Win32Exception}
原生代码299
任何人都可以帮我解释一下这个问题吗?