Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"application has failed to start ... configuration is incorrect" after upgrading?

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.

like image 694
Tavousi Avatar asked Dec 13 '11 06:12

Tavousi


3 Answers

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. Expand the References Item and check if any item has a warning symbol attached to it.
  2. 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.
  3. If the references displayed in 'Add reference' dialog box is grayed, you should probably get the reason by hovering next to the reference.
  4. 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.
  5. If it still fails , try looking at eventviewer logs by going to Start->Run->Eventvwr
  6. This should be a good way to debug this problem.

like image 149
Paweł Hajdan Avatar answered Nov 12 '22 16:11

Paweł Hajdan


Honestly...I deleted the App.config file and Re-build. And started working.

like image 44
mofidul Avatar answered Nov 12 '22 16:11

mofidul


Without understanding what was going on, I was able to fix this issue for a Windows Forms project I had just converted from VS.Net 2008 to 2010.

After conversion the Target Framework was still .Net Framework 2. When I changed it to 4.0, my application could be started and debugged. In then noticed a new line in app.config:

<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>

So, just for the sake of interest, I changed the Target Framework back to 2.0 and the line changed to:

<startup><supportedRuntime version="v2.0.50727"/></startup>

The application would still run. Then, I removed the new line altogether and the application would still run!

Finally, I undid all my changes and started the conversion again. Now, the application would run immediately!

So, if you run into this issue, just try these steps and see if it helps you.

like image 28
R. Schreurs Avatar answered Nov 12 '22 16:11

R. Schreurs