Closed natemcmaster closed 6 years ago
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.
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.
@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.
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.
I can confirm it's the Web Sites Projects that are causing the issue. After removing them the solution builds fine.
@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.
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.
The easiest fix is to just remove the website project from build configuration of solution file.
This is stale and we found a solution for my problem anyways.
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
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