“应用程序无法启动...配置不正确"升级后? [英] "application has failed to start ... configuration is incorrect" after upgrading?
问题描述
与VS2008相比,我在Windows应用程序中有一个项目.现在,我将其转换为VS2010.当我想运行我的项目时,会收到以下消息:
I have a project in windows application than was in VS2008. Now I convert it to VS2010. When I want to run my project, I get this message:
由于应用程序配置不正确,此应用程序无法启动.请检查清单文件以查找可能的错误."
"This application has failed to start because the application configuration is incorrect. Review the manifest file for possible error."
如何运行我的应用程序? 谢谢.
How to I can run my application? Thanks.
推荐答案
我遇到了同样的问题,即整个C#解决方案都是在以前的版本中创建的,并且在新的VS.Net版本中也无法正常工作,并给出了相同的错误.这里有几件事可以帮助您解决问题
I had the same problem where my entire C# solution was created in previous version and it did not work in new VS.Net version giving the same error. Here are a few things that will help you resolve the problem
- 展开参考项目",然后检查是否有附加了警告符号的项目.
- 如果为(1),请单击参考->添加参考,然后尝试添加带有警告的参考.现在警告标志必须消失.
- 如果添加参考" 对话框中显示的参考为灰色,则可能应将鼠标悬停在参考旁边,以获取原因.
- 对我来说,它是灰色的,并且清楚地提到该组件与当前的.NET Target运行时不兼容.右键单击 Project->'Properties',然后尝试更改.NET Runtime,并通过编译整个解决方案并尝试执行来进行尝试.
- 如果仍然失败,请尝试转到开始->运行-> Eventvwr 查看eventviewer日志
- 这应该是调试此问题的好方法.
- Expand the References Item and check if any item has a warning symbol attached to it.
- If (1) , click on References->Add Reference and try to add the reference which has the warning. Now the warning sign has to go away.
- If the references displayed in 'Add reference' dialog box is grayed, you should probably get the reason by hovering next to the reference.
- For me it was grayed and it clearly mentioned that the component is not compatible with the current .NET Target runtime. Right click on Project -> 'Properties' and try to change the .NET Runtime and give a shot by compiling the entire solution and try to execute it.
- If it still fails , try looking at eventviewer logs by going to Start->Run->Eventvwr
- This should be a good way to debug this problem.
这篇关于“应用程序无法启动...配置不正确"升级后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!