Share via


Visual Studio Shows Build Failed But No Errors are Displayed

Question

Tuesday, May 7, 2013 10:05 PM | 6 votes

I have enabled the Error List at the bottom of my visual studio 2010, and when I build my project, it tells me build failed, however the error list does not produce any errors?

Is this a settings?  Has my project become corrupt?  Someone help! :)

All replies (22)

Wednesday, May 8, 2013 1:21 PM âś…Answered | 22 votes

I found what was causing the issue.  I looked at my output window when I was building and it displayed the issue.


Tuesday, May 7, 2013 11:45 PM | 3 votes

Try deleting the bin folder in the prject which will force all the code to get recompiled.  this normally works.  don't worry VS will recreate the bin folder when it doesn't exist.

jdweng


Wednesday, May 8, 2013 11:49 AM | 1 vote

Deleting the bin folder, did not correct my issue.  I am still getting the build failed message, but nothing is showing in the error list.


Wednesday, March 26, 2014 1:16 PM | 4 votes

I get the same error, and my output windows shows the following message:

1> Rebuild All started: Project: DataLayer, Configuration: Debug Any CPU
2> Rebuild All started: Project: ManualTester, Configuration: Debug Any CPU
========== Rebuild All: 0 succeeded, 2 failed, 0 skipped ==========

What is this issue? I need to close VS and reopen it. Then it works for a while and without any reason it locks again. :(


Wednesday, March 26, 2014 1:23 PM | 2 votes

Found my solution here:

https://github.com/versionone/VersionOne.Client.VisualStudio/issues/10


Monday, August 3, 2015 12:17 PM | 1 vote

Thanks.. it worked for me.


Thursday, August 20, 2015 7:22 AM | 1 vote

I have the same issue, but in my case nothing is displayed in the output window. It is really annoying.

I found in another post that it should work after deleting the ".suo" files associated to the project. I searched for them in the project files and found nothing! I thought they were all refering to an older VS version. However I now realise that by default, hidden files are not displayed in Windows 8. So that option should be tourned on first from the control panel.

After all that mess, it should work.


Monday, December 14, 2015 9:45 PM | 1 vote

I just dealt with a similar problem. If all else fails, you can always use the MSBuild.exe in command prompt to build a projects.

  1. Open "Developer Command Prompt" for your version of Visual Studio. In the case of VS 2013, it is located here (C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts)
  2. In the command prompt. type "MSBuild.exe C:\Path\ToYourProject /verbosity:d"

For more information regarding MSBuild.exe, search MSDN

Also if you want to pipe the output to a text file to view the output easier.

"MSBuild.exe C:\Path\ToYourProject /verbosity:d > C:\buildOutput.txt"


Tuesday, January 19, 2016 12:18 PM | 5 votes

Sometimes you should check if you have an external reference which targets .Net version higher than your project.

Raise your .Net Version and should solve the problem.


Tuesday, June 7, 2016 11:39 PM | 1 vote

i has same error as you, so i try different way to fix this problem, but still has not solve this problem. Finally, I had to uninstall vs and reinstall visual Studio.

   => this is solution when  i rebuild give result success.

thanks and best regards!


Wednesday, August 3, 2016 10:09 PM | 1 vote

Simple.

1. Delete "bin" directory

2. Restart computer

My Experience Explanation: This usually occurs when you install a library and some cached temp files are properly removed or remain in memory thus creating a strange situation like so.


Tuesday, November 15, 2016 8:06 AM | 2 votes

I just encountered the same problem - and the fix for me was so trivial, that I created this account so share my experience:

Before you start editing in your registry, deleting the bin folder and so on: restart your machine.


Tuesday, December 6, 2016 6:02 AM | 2 votes

Hi All,

If none of the above work. You can try to relaunch VS. That worked for me.


Friday, March 17, 2017 4:12 PM | 2 votes

This is often an issue of framework mismatch, especially when you've added references to new projects within a solution.  Check the project properties page of your reference(s) and make sure they are targeting a version of the framework that is not greater than the referencing project.

Brent


Sunday, May 14, 2017 11:35 PM | 1 vote

Following jdweng's suggestion I introduced a compile error in the project MyLibrary, deleted MyLibrary's bin folder, then compiled.  I did see some errors in the Error List window, but these were all saying "Metadata file 'MyLibrary.dll' could not be found".  The actual compile error I had introduced was still not displayed in the Error List.

However, after restarting Visual Studio, the Error List started reporting the compile error.


Saturday, August 5, 2017 8:14 AM | 1 vote

Found my solution here:

https://github.com/versionone/VersionOne.Client.VisualStudio/issues/10

This workwed for me too. I have VS2017 (v15) and PendingDeletions were in v14 nodes in the registry. Deleting all worked, although I don't really understand the underlaying reason...it all started with some NuGet reinstall due to target framework change.


Friday, October 20, 2017 9:40 PM

That worked for me


Thursday, March 1, 2018 1:11 PM

I has the same error. I tryed build in MSVC2010 and here was error showed-missed one file from installer applications directory in source place..... But this error was not showed in MSVC2017, only Build failed.... I love advance!


Wednesday, March 28, 2018 8:48 AM

Through this answer,
found out that I was missing a reference dll in the execution folder (bin).


Tuesday, February 19, 2019 3:05 PM

I've just had this, in my case it was due to following VS's recommendation to inline a variable declaration. Eg initially I had:

int myVarInt;
int myVarString = "1";

bool isValidInteger = int.TryParse(myVarString, out myVarInt);

When following the VS recommendation to inline the declaration, I ended up with the following.... and the elusive "Build failed" without any errors issue.

int myVarString = "1";

bool isValidInteger = int.TryParse(myVarString, out int myVarInt);

I assume this comes down to a similar "framework mismatch" error as others mention above, but figured it's worth mentioning this specific example


Wednesday, May 29, 2019 11:42 AM

Not displayed the issue


Tuesday, June 16, 2020 5:42 PM

The solution:
Because Prerequisites not set for debug set only for release
01-Change solution configuration ( in main screen )
set (debug to release)
set solution platform to (Any CPU)
02-Set Prerequisites for debug ( If you want to continue in debug mode )
03-set target platform version same for all Projects