Reputation: 7388
If I try to build my .sln file in visual studio (using release configuration, but actually none of my configurations build), the build fails with zero errors in the output window and none the error list. In fact, in the build output window, I have 7 projects listed. And under normal verbosity, I have 7 "Build succeeded." lines after each project. Yet at the bottom:
========== Build: 6 succeeded or up-to-date, 1 failed, 0 skipped ==========
By building the projects one by one, I have found the 'failing' project and I tried to build it all by itself. It depends on one other project and that builds just fine all by itself. I try building the 'failing' project by itself and I get zero errors and no warnings and a build failed. However in the 'bin' folder for that project, (if I delete the old bin file) I am getting a built dll. Doesn't do me much good though, since the build is 'failing', visual studio makes no effort to launch my project in debug mode.
Here's something puzzling: In the command line, I have navigated to the directory with my .sln file in it, and I then run this command:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /ToolsVersion:4.0 /p:Configuration=Release
Then, in bin/Release, voila, I have my built project. The build passes in the command line but not the IDE.
Does anyone have any suggestions? This problem has happened to me twice: Once on windows server 2008 and once on windows xp sp3.
Upvotes: 6
Views: 6386
Reputation: 1
if your solution contains too many projects ,
build projects individually,
Check which project is failing
for that project check the references of that project , if on any reference if their is yellow color mark, then delete that reference , and add that again , then build and check,
this will work
or
check in output window , each line , in some line it may be showing , dependency is their, but file didnt exist
that is the problem causing
this may be due to file corruption
Upvotes: 0
Reputation: 3994
Close Visual Studio. Run cmd, and type: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe /ToolsVersion:4.0 /p:Configuration=Release yoursolution.sln Then, enter again on VS and run your project. Worked for me!
Upvotes: 0
Reputation: 299
I had the same error, it would not build but no errors. Restarting visual studio worked for me, this was in visual studio 2012.
Upvotes: 1
Reputation: 7388
Visual Studio 2010 says Build failed with no errors after I change a source file
One answer there suggested that I change the place from where I'm building. Here's the path of the debug directory:
C:\Users\Isaac\Documents\Visual Studio 2010\Projects\checkout\Library Projects\BaseSystemCore\BaseSystemCore\bin\Debug
Just moving the checkout directory to c:\ did the trick. Something to do with the build path being too long.
Upvotes: 4