WPF应用DOTNET将在调试模式下运行,但.EXE将无法运行 [英] WPF DotNET Application will run in debug mode, but .EXE will not run
问题描述
我在C#写了一个WPF应用程序使用VS 2010的应用程序将使用Visual Studio调试模式运行很好,但是当我去从bin\release文件夹运行.EXE,没有任何反应。我不明白,从窗户任何错误消息,并且没有错误或警告在VS.我试图新建,改建和清洁解决方案(在每一个可能的顺序),没有运气。我的解决方案包含2个项目,它们都使用.NET 4.0框架,我有.NET 4.0我的电脑上安装。我曾尝试在XP和Win7,仍然一无所获。
I wrote a WPF application in C# using VS 2010. The application will run fine in debug mode using Visual Studio, but when I go to run the .EXE from the bin\release folder, nothing happens. I do not get any error messages from windows and there are no errors or warnings in VS. I have tried to build, rebuild and clean the solution (in every possible order) with no luck. My solution contains 2 projects, both of which use .NET 4.0 framework, and I have .NET 4.0 installed on my PC. I have tried on both XP and Win7 and still nothing.
我也只注意到从调试当我运行在调试模式下的应用程序的输出说:无法找到或打开PDB文件每个.dll文件加载后。
I also just noticed that the output from Debug when I run the application in debug mode says: "Cannot find or open the PDB file" after each .Dll it loads.
我编译每一次发布文件夹中,但我并尝试将其更改为debug文件夹和清洁/重建只是为了看看是否能够有所作为,并它没有,所以我改了回来,又试了一下,仍然一无所获。
I am compiling to the Release folder every time, but i did try changing it to the debug folder and clean/rebuild just to see if that would make a difference, and it didnt, so I changed it back, tried it again, and still nothing.
任何想法?
推荐答案
下面是几个浮现在脑海中的想法。
Here are a couple of ideas that come to mind
- 如果您是在x64机器上,试着从正在值为anycpu至86更改应用程序。这种模式的应用程序默认情况下在调试模式下,它有可能在64位运行的问题将在释放导致问题建立
- 可能发行的二进制文件已经过时了。从发布文件夹中删除二进制文件,重新构建并运行新生成的运行
- 在Visual Studio中的调试器下运行的发布版本,看看它,直到崩溃
这篇关于WPF应用DOTNET将在调试模式下运行,但.EXE将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!