我有一个奇怪的问题。我编写了一个 C# WPF 应用程序,它可以在 Visual Studio 调试中完美运行。但是,当我在 Visual Studio 之外启动 EXE(我没有移动 .exe,它仍然在 bin\Debug 文件夹中)时,主窗口会正确显示并工作,但如果我尝试打开第二个窗口,应用程序就会崩溃。我从网络驱动器启动 .exe,但到目前为止一直有效,这个问题今天开始。我已经注释掉了我所做的所有主要更改,但仍然存在相同的问题。
他将以下信息复制到 Temp 中:
<ParentProcessInformation>
<ParentProcessId>3476</ParentProcessId>
<ParentProcessPath>C:\Windows\explorer.exe</ParentProcessPath>
<ParentProcessCmdLine>C:\Windows\Explorer.EXE</ParentProcessCmdLine>
</ParentProcessInformation>
<ProblemSignatures>
<EventType>CLR20r3</EventType>
<Parameter0>zimk.kalender.exe</Parameter0>
<Parameter1>1.0.0.0</Parameter1>
<Parameter2>53c4f986</Parameter2>
<Parameter3>PresentationFramework</Parameter3>
<Parameter4>3.0.0.0</Parameter4>
<Parameter5>5167b4d1</Parameter5>
<Parameter6>6263</Parameter6>
<Parameter7>e1</Parameter7>
<Parameter8>System.Windows.Markup.XamlParse</Parameter8>
</ProblemSignatures>
我从 .mdmp 文件中获得的信息:
Exception Code: 0xE0434F4D
Exception Information: An exception came from CLR
最佳答案
好吧,我明白了。我使用命令行参数
,但忘记使用参数
启动exe。
抱歉,我浪费了您的时间。
关于C# WPF 应用程序在 VS 调试中运行,但不作为 EXE 运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24755337/