Repository navigation
Solution build fails with zero errors #1767
Copy link
Copy link
Closed
Labels
Description
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
Reactions are currently unavailable
Activity
Eilon commentedon Feb 28, 2017
BTW we suspect that this is broken because the SLN contains Web Site Projects, and that
dotnet buildgets confused with it, but of coursemsbuild.exehas no problem with it.SteveSandersonMS commentedon Feb 28, 2017
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
.slnto unblock ourselves - it's perfectly fine to be using VS Code for all the non-.NET projects.Eilon commentedon Feb 28, 2017
@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.
rainersigwald commentedon Feb 28, 2017
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.
Remove web site projects as these are not yet supported by MSBuild fo…
natemcmaster commentedon Feb 28, 2017
I can confirm it's the Web Sites Projects that are causing the issue. After removing them the solution builds fine.
Eilon commentedon Feb 28, 2017
@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 buildto 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.Fixup MSBuild conversion (#721)
danmoseley commentedon Mar 1, 2017
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.
Rychu-Pawel commentedon Jun 15, 2018
The easiest fix is to just remove the website project from build configuration of solution file.
natemcmaster commentedon Sep 28, 2018
This is stale and we found a solution for my problem anyways.