How to find the cause of a failed build without any error or warning

I have a web application that contains a link to WCF services.

When building using Visual Studio 2010, the assembly fails without any errors or warnings. However, creating .csproj using MsBuild successful.

I can’t understand what I should try in Visual Studio to solve / diagnose the problem. Can you help?

EDIT:

I found that the assembly failed,

  1. From the text displayed in the status bar.
    enter image description here

  2. From the output window:

     ========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ========== 
+118
c # visual-studio-2010
Nov 05
source share
29 answers

I faced a similar situation. In my case, the user action (from the MSBuildVersioning package available on Nuget.org - http://www.nuget.org/packages/MSBuildVersioning/ ) that appeared in the csproj file indicated that BeforeBuild was targeting without launching any message about an error in the usual place.

I was able to determine this by setting the verbosity of the MSBuild project assembly (in the Visual Studio Options / Projects and Solutions / Build and Run area) to "Diagnostic" as shown below. Then it showed that the custom action (in my case HgVersionFile) was an error.

Screen capture from Visual Studio showing the modified setting.

+91
Dec 11 '14 at 2:42 on
source share

Build + Intellisense swallowed error messages. The Build Only selection displayed them.

Screen shot

+84
Dec 10 '17 at 9:16 on
source share
  • If the solution contains more than one project, try creating them one at a time.
  • Try restarting Visual Studio.
  • Try restarting your computer.
  • Try Restore All
  • Try “Clear Solution,” then delete the “vspscc” and “vssscc” files, and then restart Visual Studio and then “Rebuild Everything.”
+55
Jun 10 '14 at 12:32
source share

VS (2013 Pro, Win 8.1) reboot did this for me.

+21
Nov 06 '14 at 2:35
source share

I want to expand Sasse answer .

To fix the problem with updating Visual Studio 2015 2, I had to build each project one at a time and watch the output window after each build.

One project gave me

"The type or namespace name" SomeNamespace "does not exist in the namespace" BeforeSomeNamespace "(are you missing the assembly reference?)."

There were no errors in the error list window, but there was a yellow warning sign in the "Links" section on the assembly.

Then I saw that the link project is focused on 4.5.1 and on the mentioned project 4.6.1. Changing 4.6.1 to 4.5.1 allowed to build a general assembly.

+9
Apr 16 '16 at 17:51
source share

Delete the .vs folder and restart VS, it worked for me

enter image description here

+6
May 05 '18 at 7:14
source share

Nothing worked for me, so I deleted the .suo file, restarted VS, cleared the projected one, and then the build will work.

+5
Aug 11 '16 at 19:50
source share

It seems that there are several answers to this question, so I will add personal information from personal experience, hoping that this will save someone time / stress.

Make sure that all the projects in your solution are configured for the same version of .NET.

Like the OP, there were 0 errors, but the assembly did not work. However, there was one warning entry (buried between several hundred useless XML warnings ...) that said that one project was for a different version of .NET than the project that referenced it. The whole problem was that one project in my solution was for .NET 4.5.2, while the rest was aimed at 4.5.1. It should work even with this discrepancy (hence, it was just a warning), but, unfortunately, it broke the assembly.

The strange part was that it built / worked fine for a while, but suddenly the assembly started to fail, causing one problem. Not sure what I did for this to start complaining about different target versions of .NET, but I feel that in Visual Studio there are only some puzzles that will never be solved.

+4
Nov 02 '16 at 23:03
source share

First, “Clear the solution”, then restore the soln.

If this does not help close the solution and restart the solution.

Try these things, hope it will definitely work.

+3
Dec 24 '15 at 14:15
source share

In other cases, it is possible that Visual Studio should run as an Administrator, this may be due to a deployment to a local IIS server or other deployment.

+3
Nov 16 '16 at 10:12
source share

this can happen when one of the referenced projects is a higher version of the .NET platform than your current project.

+3
Jan 02 '17 at 0:26
source share

I had the same problem and traced this problem to the "Build + Intellisense" error list options.

If this option is selected, then errors in the list are not displayed. Switch to " Build Only " and errors will appear as expected.

This seems like a bug in Visual Studio. Restarting the visual studio solved this problem .

+3
Sep 17 '18 at 15:19
source share

I had a similar problem after adding a new project (called TestCleaner) to my solution: build failed, no errors.

I increased voluminous verbosity (see Richard J. Foster's instructions) and looked for a conclusion for the “unsuccessful”. I quickly discovered which project failed, and why: the TestRunner project failed with "error CS0246: the type name or namespace" TestCleaner "could not be found" (although no problems were highlighted in the code).

Link checking TestRunner, of course, the link to TestCleaner was marked as unresolved, and the path was missing in the link properties. Removing and re-adding did not fix. Again, no explanation why.

unresolved link

Finally, I discovered a reason: "TestCleaner" used a different target structure for other projects. It was .Net 4.5.2; the rest is 4.5.

+2
Jun 24 '16 at 3:42 on
source share

Just for the sake of completing, and possibly helping someone to face the same error again in the future, I used the Metro Mahapps interface and changed the XAML of one window, but forgot to change the partial class in the code. In this case, the assembly failed without an error or warning, and I could find it by increasing the verbosity of the output from the settings:

Error panel

output area

+2
Apr 25 '17 at 8:49
source share

I had the same problem. In the error list window, there are two drop-down lists "Show items contained in" and "Show problems encountered." These names are visible after hovering over the drop-down list. The Show Released Issues drop-down list was set to Build + IntelliSense, and after switching to Build Only, errors appeared in the list.

+2
May 25 '17 at 15:36
source share

Go to the output window, search for "error" in the output window, TADA

+2
Mar 07 '19 at 9:13
source share

For me, it decided to remove the .vs folder from the root of the solution and restart Visual Studio.

It may also be important to say that although errors did not appear in the Error List panel, they were still present in the output from the assembly.

+1
Aug 28 '17 at 17:39 on
source share

This happened to me after adding a new page to an asp.net project.

What I did was to exclude the page so that it was successfully built.

Then I added back a page with all the comments. Success.

Then I chopped the code into bits, and then it all worked.

0
Jul 29 '14 at 19:25
source share

I had the same problem after deleting multiple forms. Errors occurred as soon as I entered the code and made a "Show Definition" for one of the controls that I deleted.

I also aimed at a higher structure in one of my projects, so maybe this is also a problem.

0
Mar 17 '17 at 0:47
source share

I ran into the same problem! Just delete the bin folder and restart VS All this. Tested in VS 2013 .

0
Jul 19 '17 at 1:31 on
source share

I tried everything, but nothing worked in my case, then I changed these settings mentioned, which solved the problem for me well. Try it if it can help any last audience. These settings may be different in your situation, but be sure to build all the included DLLs with the same configuration settings that you saved at the beginning (see. Image). Configuration settings

The image is here.

Hurrah!

0
Oct 26 '17 at 4:17 on
source share

If the nuget package "Microsoft.Net.Compilers" is installed, make sure that it matches the version of your Visual Studio (Build Tools version).

Version 1.x means C # 6.0 (Visual Studio 2015 and updates). For example, 1.3.2

So do not upgrade to version higher than 1.x if you are using VS2015

stack overflow

0
Mar 10 '18 at 19:12
source share

I had a really old project on an old machine. The project was built correctly when I turned off the car. Today I get a build error, but there is no error message. Having tried some offers from above, no luck.

In Visual Studio 2015, I enabled detailed MSBuild under TOOLS> Options> Projects and Solutions> Build and Run

This gave me some details about the assembly, but without errors. After that, I tried to check Extensions and Updates (Tools> Extensions and Updates) and found that some of them need updating.

The Nuget package was the culprit, after updating Nuget - the assembly was successful.

enter image description here

0
Mar 17 '18 at 16:14
source share

Since everything does not work, I found that errors are not displayed when opening a project as a solution (.sln), while an error is displayed when opening a project as a project.

0
Aug 27 '18 at 12:49
source share

I had the same problem, I changed Tools -> Options -> Projects and Solutions / Build and Run -> MSBuild Detailing the project build log file [ Diagnostics ]. This option shows an error in the log, for some reason my VS does not show an error on the Errors tab!

enter image description here

Make the above settings in the output copy in notepad / text editor and find the error. He will show you all the errors.

0
Sep 28 '18 at 6:37
source share

Restarting Visual Studio worked for me. Also try restarting Visual Studio in normal mode (do not run as administrator). Try rebooting the system and repeat the step above.

0
Jun 17 '19 at 16:19
source share

Try building your project from the Powershell command line:

 dotnet build 

Then you can see any errors in the command line output, even if Visual Studio is playing hide and seek with build error messages.

0
Aug 6 '19 at 16:10
source share

Another way to reproduce this symptom:

I added a new project to the existing solution, and the assembly output reported errors, such as "type or namespace name X could not be found ...", but there were no errors in the error list.

The classes I referenced were in other projects (referenced) in the same solution.

It turned out that I mistakenly selected an earlier version of .net in a new project. As soon as I switched to the same version as other projects, everything was built without errors.

0
Aug 15 '19 at 20:25
source share

This may be due to the difference in the version of ReportViewer in your project and VS

-one
Aug 04 '18 at 14:28
source share



All Articles