Skip to content

Solution build fails with zero errors #1767

Closed

Description

@natemcmaster

Build a solution can cause MSBuild to succeed on all projects build still fail. When it fails, it shows zero errors and no additional information about what went wrong.

Repro:

https://github.com/aspnet/JavaScriptServices/tree/d8128ee3dcb687a854ee509d62d255c1eba48723

dotnet restore JavaScriptServices.sln
dotnet build JavaScriptServices.sln

Output

dotnet build
Microsoft (R) Build Engine version 15.1.548.43366
Copyright (C) Microsoft Corporation. All rights reserved.

  Microsoft.AspNetCore.NodeServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices\bin\Debug\net451\Microsoft.AspNetCore.NodeServices.dll
  Microsoft.AspNetCore.NodeServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices\bin\Debug\netstandard1.6\Microsoft.AspNetCore.NodeServices.dll
  Microsoft.AspNetCore.SpaServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.SpaServices\bin\Debug\net451\Microsoft.AspNetCore.SpaServices.dll
  KnockoutSpa -> C:\dev\Universe\JavaScriptServices\templates\KnockoutSpa\bin\Debug\netcoreapp1.1\KnockoutSpa.dll
  ReactSpa -> C:\dev\Universe\JavaScriptServices\templates\ReactSpa\bin\Debug\netcoreapp1.1\ReactSpa.dll
  AureliaSpa -> C:\dev\Universe\JavaScriptServices\templates\AureliaSpa\bin\Debug\netcoreapp1.1\AureliaSpa.dll
  Angular2Spa -> C:\dev\Universe\JavaScriptServices\templates\Angular2Spa\bin\Debug\netcoreapp1.1\Angular2Spa.dll
  WebApplicationBasic -> C:\dev\Universe\JavaScriptServices\templates\WebApplicationBasic\bin\Debug\netcoreapp1.1\WebApplicationBasic.dll
  ReactReduxSpa -> C:\dev\Universe\JavaScriptServices\templates\ReactReduxSpa\bin\Debug\netcoreapp1.1\ReactReduxSpa.dll
  Microsoft.AspNetCore.NodeServices.Sockets -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices.Sockets\bin\Debug\net451\Microsoft.AspNetCore.NodeServices.Sockets.dll
  NodeServicesExamples -> C:\dev\Universe\JavaScriptServices\samples\misc\NodeServicesExamples\bin\Debug\netcoreapp1.1\NodeServicesExamples.dll
  Microsoft.AspNetCore.SpaServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.SpaServices\bin\Debug\netstandard1.6\Microsoft.AspNetCore.SpaServices.dll
  Microsoft.AspNetCore.NodeServices.Sockets -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.NodeServices.Sockets\bin\Debug\netstandard1.6\Microsoft.AspNetCore.NodeServices.Sockets.dll
  Microsoft.AspNetCore.AngularServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.AngularServices\bin\Debug\net451\Microsoft.AspNetCore.AngularServices.dll
  Microsoft.AspNetCore.ReactServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.ReactServices\bin\Debug\net451\Microsoft.AspNetCore.ReactServices.dll
  LatencyTest -> C:\dev\Universe\JavaScriptServices\samples\misc\LatencyTest\bin\Debug\netcoreapp1.1\LatencyTest.dll
  Microsoft.AspNetCore.ReactServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.ReactServices\bin\Debug\netstandard1.6\Microsoft.AspNetCore.ReactServices.dll
  Microsoft.AspNetCore.AngularServices -> C:\dev\Universe\JavaScriptServices\src\Microsoft.AspNetCore.AngularServices\bin\Debug\netstandard1.6\Microsoft.AspNetCore.AngularServices.dll
  ReactGrid -> C:\dev\Universe\JavaScriptServices\samples\react\ReactGrid\bin\Debug\netcoreapp1.1\ReactGrid.dll
  MusicStore -> C:\dev\Universe\JavaScriptServices\samples\react\MusicStore\bin\Debug\netcoreapp1.1\MusicStore.dll
  MusicStore -> C:\dev\Universe\JavaScriptServices\samples\angular\MusicStore\bin\Debug\netcoreapp1.1\MusicStore.dll
Controllers\FullPagePrerenderingController.cs(16,13): warning CS0618: 'JavaScriptModuleExport.WebpackConfig' is obsolete: 'Do not use. This feature will be removed. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.' [C:\dev\Universe\JavaScriptServices\samples\misc\Webpack\Webpack.csproj]
  Webpack -> C:\dev\Universe\JavaScriptServices\samples\misc\Webpack\bin\Debug\netcoreapp1.1\Webpack.dll

Build FAILED.

Controllers\FullPagePrerenderingController.cs(16,13): warning CS0618: 'JavaScriptModuleExport.WebpackConfig' is obsolete: 'Do not use. This feature will be removed. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.' [C:\dev\Universe\JavaScriptServices\samples\misc\Webpack\Webpack.csproj]
    1 Warning(s)
    0 Error(s)

Time Elapsed 00:00:07.24

Returns with error code 1.

The warning does not cause the build to fail. Disabling this CSC warning and recompiling the solution still causes the same zero-error failure.

Increasing verbosity does not show additional information about what failed.

Details
dotnet.exe: 1.0.0-rc4-004911
Does not happen in MSBuild.exe

cc @SteveSandersonMS

Activity

  1. Eilon commented on Feb 28, 2017

    @Eilon

    BTW we suspect that this is broken because the SLN contains Web Site Projects, and that dotnet build gets confused with it, but of course msbuild.exe has no problem with it.

  2. SteveSandersonMS commented on Feb 28, 2017

    @SteveSandersonMS
    Member

    Glad to have helped find an edge case :)

    @Eilon, @natemcmaster The Web Site Projects are an unfortunate throwback, only there because it doesn't seem there's any modern alternative. But TBH we can just remove them from the .sln to unblock ourselves - it's perfectly fine to be using VS Code for all the non-.NET projects.

  3. Eilon commented on Feb 28, 2017

    @Eilon

    @SteveSandersonMS if you're OK with that, that's fine with me. An alternative that @natemcmaster suggested was to just build the csproj's by globbing for them, and thus avoid building the SLN until this issue is resolved.

  4. rainersigwald commented on Feb 28, 2017

    @rainersigwald
    Member

    Web Site Projects sounds entirely plausible as a reason. They are treated specially and I bet we didn't have any test coverage on them when porting to Core. Of course, even if we don't support them in .NET Core MSBuild we should at least have an error.

  5. natemcmaster commented on Feb 28, 2017

    @natemcmaster
    ContributorAuthor

    I can confirm it's the Web Sites Projects that are causing the issue. After removing them the solution builds fine.

  6. Eilon commented on Feb 28, 2017

    @Eilon

    @rainersigwald yeah at the very least there should be an error stating that there's some unknown entries in the SLN. I don't think I'd expect dotnet build to actually support building Web Site Projects because that's a whole world unto itself. Or, at least, that would have to be a new feature request and treated independently of this issue.

  7. added a commit that references this issue on Mar 1, 2017
  8. danmoseley commented on Mar 1, 2017

    @danmoseley

    There was test coverage of them in the "trun suites" that MSBuild used to have, but not much in the unit tests. I believe the "trun suite" coverage was not ported to github.

  9. Rychu-Pawel commented on Jun 15, 2018

    @Rychu-Pawel

    The easiest fix is to just remove the website project from build configuration of solution file.

    image

  10. natemcmaster commented on Sep 28, 2018

    @natemcmaster
    ContributorAuthor

    This is stale and we found a solution for my problem anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions