Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 says Build failed with no errors after I change a source file

I have a Visual Studio 2010 solution with a few projects. I can successfully build with Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building I press CTRL+F5 and successfully run the start up project. This works as expected.

After I change a source file, save it and then again build (with either Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject) it builds successfully. I am still able to press CTRL+F5 and run the startup project. This again works as expected.

The problem is in the following scenario: After I change a source file, save it and directly press CTRL+F5 then Visual Studio 2010 says BUILD FAILED and there are no errors. And it doesn't start my startup project (of course).

Am I missing something?

like image 239
Ceco Avatar asked Feb 21 '11 15:02

Ceco


People also ask

How do I fix Visual Studio build errors?

In Visual Studio, go to the menu bar and choose Help > Send Feedback > Report a Problem, or submit a suggestion by using Help > Send Feedback > Send a Suggestion.

How do you fix there were build errors?

Tools > Options > Projects and Solutions > Build and RunThe selection in the second dropdown “On Run, when build or deployment errors occur”, even if the code has the error during the run, project runs with the last successful build. That's why it should be changed.

How do I show build errors in Visual Studio?

To display the Error List, choose View > Error List, or press Ctrl+\+E.


1 Answers

Close Visual Studio, delete the .suo file for your solution. It's a 'hidden file' in Windows and contains user preferences, but it can also do nasty things.

like image 63
kerem Avatar answered Oct 03 '22 13:10

kerem