我尝试将可执行文件添加到我的 Azure 辅助角色并从代码中调用它。但我不是 100% 确定路径的外观。我将 Visual Studio 中的可执行文件添加到我的辅助角色项目中,设置为内容并始终复制。在我的工人角色中,我打电话给
Process.Start(Path.Combine(Environment.GetEnvironmentVariable("RoleRoot"), "Executable.exe"));
这导致
AppDomain Unhandled Exception 异常:系统找不到在 System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo) [...] at System.Threading.ThreadHelper.ThreadStart() 指定的文件
我的天蓝色项目的名称是“AzureProject”,我的工作角色的名称是“QueueWorker”,可执行文件“Executable.exe”。我想路径是错误的。