How to find reason of failed Build without any error or warning

后端 未结 30 941
旧时难觅i
旧时难觅i 2020-11-29 20:01

I have a WebApplication which contains reference to WCF services.

While building using Visual Studio 2010, Build fails without any error or warning. However building

相关标签:
30条回答
  • 2020-11-29 20:45

    I had the same problem. The error list window has 2 dropdowns "Show items contained by" and "Show issues generated". These names are visible after hovering over the dropdown. The "Show issues generated" dropdown was set to "Build + IntelliSense" and after changing to "Build Only" the errors appeared on the list.

    0 讨论(0)
  • 2020-11-29 20:46

    VS (2013 Pro, Win 8.1) restart did it for me.

    0 讨论(0)
  • 2020-11-29 20:47

    Nothing was working for me so I deleted the .suo file, restarted VS, cleaned the projected, and then the build would work.

    0 讨论(0)
  • 2020-11-29 20:47

    I had really old project on older machine. Project was building correctly when I turned off machine. Today, I am getting build error but no error message. After trying some of suggestion from above, no luck.

    In Visual Studio 2015, I turned on Detailed MSBuild under TOOLS > Options > Projects and Solutions > Build and Run

    It gave me few details about build but no errors. After that I tried to check Extensions and updates (Tools > Extension and Updates) and found few of them needed update.

    Nuget Package was culprit, after updating Nuget - build is successful.

    0 讨论(0)
  • 2020-11-29 20:48

    What solved it for me was deleting the .vs folder from the root of the solution and restarting Visual Studio.

    Also maybe important to say that even though the errors were not showing in the Error List pane, they were still present in the Output from the Build.

    0 讨论(0)
  • 2020-11-29 20:49

    In my case I set Diagnostic for the MSBuild verbosity as shown here.

    Guess what... in the last line of the Output window in Visual Studio it showed this:

    2>"C:\Company\Project\project.sharded\Project\Project.csproj" (Rebuild;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) ->
    2>(CoreCompile target) -> 
    2>  C:\Company\Project\project.sharded\Project\Services\UserService.cs(387,59,387,62): error CS0136: A local or parameter named 'sut' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter
    2>
    2>    2147 Warning(s)
    2>    1 Error(s)
    

    This looks like a bug in Visual Studio 2019 (16.3.5).

    No errors were shown in the Error List window in Visual Studio.

    This is the kind of errors that generally appear in the Error List window.

    This is the offending line:

    var sut = _sdb.SysUsableThreads.SingleOrDefault(sut => sut.uid == thread.uid && sut.thread_core == thread.core);
    

    OK. Can't use sut because the var is named sut and I named the lambda sut. Again, this is the kind of thing that should be displayed in the Error List. For sure this is a bug in Visual Studio 2019. I reported it inside Visual Studio.

    0 讨论(0)
提交回复
热议问题