【发布时间】:2014-04-24 02:58:33
【问题描述】:
在 C# 中执行控制台命令程序时出现以下错误
'CutyCaptApp.vshost.exe' (Managed (v4.0.30319)): Loaded C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'CutyCaptApp.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 'vshost.NotifyLoad' (0x19a4) has exited with code 0 (0x0).
The thread 'vshost.LoadReference' (0x6ac) has exited with code 0 (0x0).
'CutyCaptApp.vshost.exe' (Managed (v4.0.30319)): Loaded 'C:\Srinivasa\VisualStudioProject\CutyCaptApp\CutyCaptApp\bin\Debug\CutyCaptApp.exe', Symbols loaded.
The thread '<No Name>' (0x1d3c) has exited with code 0 (0x0).
这是我的 C# 代码:
static void Main(string[] args)
{
Process process = new System.Diagnostics.Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "C:\\Srinivasa\\VisualStudioProject\\CutyCapt_Pdf_Code\\release\\CutyCapt.exe";
//startInfo.Arguments = f;
Process.Start(startInfo);
//startInfo.FileName = "C:\\Srinivasa\\VisualStudioProject\\CutyCapt_Pdf_Code\\release\\CutyCapt.exe"; startInfo.Arguments = "--url=C:/Users/UPPALASX/Desktop/New folder/ResearchMap.html --out=C:\\Srinivasa\\VisualStudioProject\\CutyCapt_Pdf_Code\\release\\Out_Embeded_RM.png";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
}
错误来自哪里?
【问题讨论】:
-
您使用的是哪个操作系统?如果 Windows 7 则尝试以管理员身份运行 VS 并检查。
-
这不是错误。
-
我无法以管理员模式打开VS。
-
这不是错误。这是 Visual Studio 中的输出窗口。
-
你为什么认为是首先是一个错误?你预期会发生什么,你观察到了什么?您是否尝试调试该程序?您不必以管理员身份运行 Visual Studio 即可调试程序。
标签: c# .net command-line console-application