Visual Studio 2010 says the build failed without errors after changing the source file

I have a Visual Studio 2010 solution with multiple projects. I can successfully build using Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject. After building, I press CTRL + F5 and successfully launch the startup project. This works as expected.

After I changed the source file, save it, and then create it again (using Build -> Build Solution or Build -> Build MyCompany.MyProduct.MyProject) it will be successfully generated. I can still press CTRL + F5 and start the launch project. This works again as expected.

The problem is the following scenario: After I changed the source file, save it and directly press CTRL + F5, then Visual Studio 2010 says that BUILD FAILED and there are no errors. And it does not start my launch project (of course).

Did I miss something?

+63
visual-studio build visual-studio-2010
Feb 21 '11 at 15:47
source share
16 answers

Close Visual Studio, delete the .suo file for your solution. This is a “hidden file” on Windows and contains user preferences, but it can also do unpleasant things.

+109
Jun 27 '11 at 10:22
source share

It seems a bit late, but checking my output window worked for me.

I had a link to a function that did not exist yet. I don’t know why it didn’t appear in the list of errors, but the Results window informed me exactly where the problem was.

+20
Jun 12 2018-12-12T00:
source share

Try repeating the same steps by changing the location where you compile / execute. Make sure your new location has fewer folders to navigate than your old location. The long path to the source code led to a similar problem for me, and I overcame it by choosing a shorter path.

+12
Jun 27 '11 at 8:50
source share

I closed my visual studio.

Removed any bin folder. (I had a strange permission error, so I deleted the files, and the track deleted the folders, including bin).

Open visual studio. Build or rebuild, and everything works again.

+8
Dec 04 '13 at 2:51
source share

Check the physical path of your project. If the duration is, copy the project to a folder with a root directory with a very short name. And try to build your project.

+3
Nov 10 '14 at 10:45
source share

I had this problem and had one warning, but I could not find any errors. In the end, I copied the build command from the output window to the command window and ran it manually - after a warning, I spat out four errors. I have no idea why this worked.

The necessary command should be marked as "CoreCompile" and look something like this: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702,2008 /nostdlib+ /errorreport:prompt /warn:4 /define:TRACE;SILVERLIGHT;WINDOWS_PHONE /errorendlocation /preferreduilang:en-US /highentropyva- /reference:"C:\Dropbox\code

If you don’t see this, try changing the output settings of the assembly in the Tools-> Options-> Projects and Solutions-> Build and Run section, set the verbosity of the MSBuild project assembly to Normal or higher.

+2
Jan 12 '15 at 9:05
source share

If some other people are experiencing this problem (I first tried to delete the SUO file, but this did not work for me):

I solved this by creating an empty project in my solution and importing all the source files into a new project. Probably the problem was in the project file.

+1
Oct 24
source share

I had the same problem solved in the next step

go to "Tool-> option-> projects and Solution-> General, be sure to check the box" Always show a list of errors if the assembly ends with errors ", in this case the visual studio will show a list of errors.

+1
Jul 13 '15 at 21:20
source share

In my case, I did not see the Code Contracts error in the output window:

 CodeContracts: xxx: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. 

I solved this by disabling the cache results in the Code Contracts windows for this project, as suggested in this answer .

0
Jan 08 '13 at 1:54
source share

I was working on a website project that referenced the library project (in the same solution) when I came across this problem. Build error when the editor selected syntax and moved to the original one. Very frustrating.

None of the other answers worked for me; I thought this question might be related to the recent use of DBML on this computer. Still not quite sure that this did not contribute.

After clearing the solution, temp files, rebooting VS, etc., I ended up excluding two intruder files, which allowed me to successfully build the solution, and then when I turned them on again, everything was built correctly.




postscript I later found an error on the codebehind main page of the website (referring to the value of the enumeration that was deleted) that did not appear as an error. I had errors in the masterpage codebehind causing (apparently) unrelated problems before; I try to remember that where a simple solution is not presented.
0
Jan 26 '13 at 0:59
source share

My problem arose as a result of converting the vs2008 functional project to vs2010. All other projects in the solution came across small ones, but this one will build part of the MIDL, and then stop and fail. Detailed build setup showed nothing, so finally I created a completely new project with all the files. It worked. Then I compared the settings and finally, after changing the various parts to fit, I found that in the converted project MIDL-> General → "MkTypeLib Compatible" is set to empty. Apparently, this was a valid installation in vs2008, but in vs2010 it should be set to Yes or No (or inherit).

This fixed my problem.

0
Feb 05 '13 at 21:46
source share

If your solution contains too many projects,

build projects individually

Check which project is not working

for this project, check the links to this project, if any link, if they are marked in yellow, then delete this link and add it again, then create and verify

it will work

or

check the output window, each line, in some line that it can show, the dependency is theirs, but did not find it, this is the problem causing

this may be due to file corruption

0
May 19 '14 at 9:09
source share

Does this problem arise when working with Sharepoint 2013 workflows in VS 2013. To solve it, the following was performed:

  • Upload project worklfows (buggies).
  • Delete the .csproj.user file
  • The .csproj file is opened in notepad and delete the following lines:

      <PropertyGroup> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '11.0'">11.0</VisualStudioVersion> <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> 

After the RELOADING project turned into a solution, VS added exactly the same AGAIN lines, but now a LoaderException does not occur.

0
May 30 '14 at 7:58
source share

I had this problem today ... after I changed the verbosity of the construction to diagnostics, for example, @Jac, I found that the problem was related to my one resx file. Apparently one image was damaged or was too large, I deleted it and it will work!

0
Sep 30 '15 at 14:19
source share

I ran into this problem two days ago. I checked the output of Windows and I based the missing link to VBIDE: I can not find the wrapper assembly for the VBIDE type library. I showed all the files in the solution explorer, extended links, and I found that there is a link to this assembly. I do not know how this link got into my project, and I was sure that I did not need it. I just deleted it and everything was fixed.

0
Jan 06 '16 at 20:25
source share

Another thing to check is that if any of your source files is open, it cannot build. I had to restart my computer.

0
Jul 07 '17 at 9:59
source share



All Articles