Closed rainersigwald closed 2 weeks ago
This isn't easily possible: there's not actually a distinction of "project type" except within the solution (which may or may not be involved in a command line build process).
Even with full-framework MSBuild.exe
, a build can fail because a particular environment doesn't have all the right Visual Studio workloads or SDKs (in the classic, not project-element sense) installed.
That said, this is definitely a pit of failure. I'm going to move this to the CLI repo; we may be able to apply some heuristics before invoking MSBuild on projects through dotnet build
.
I need a "hard problem" label like coreclr
Oh man, so do we!
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
This issue will now be closed since it has been labeled 'stale' without activity for 30 days.
Note that there have been some MSBuild-side improvements here https://github.com/dotnet/msbuild/pull/9625.
From @onovotny on July 19, 2018 15:56
Steps to reproduce
Create a new .NET Framework project using the legacy template. Run
dotnet build
on it. It works, sometimes.https://github.com/reactiveui/refit/issues/511#issuecomment-406326126
However, if some NuGet references do things with custom targets, it can quickly error out. Also, certain project types, like WPF/WCF will currently fail.
This can be remedied with an error if
dotnet build
detects that it's a legacy project type.The current behavior conveys the wrong expectations that it should work.
Copied from original issue: Microsoft/msbuild#3526