dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.22k stars 1.35k forks source link

Hard-to-diagnose failure when deploying Framework MSBuild assemblies but intending to target Core #5176

Open Forgind opened 4 years ago

Forgind commented 4 years ago

Steps to reproduce

1) Build MSBuild

Expected behavior

Some indicator that you built targeting Framework but tried to run MSBuild as if you'd targeted Core.

Actual behavior

Build Failed 0 Warning(s) 0 Error(s)

msbuild.log

msbuild.txt (Change the latter to a binlog)

Since this won't affect external customers, we shouldn't make it run every time someone builds. It might be reasonable to take the location and output a warning if running Deploy-MSBuild without specifying Core to a folder under sdk.

rainersigwald commented 4 years ago

One other idea I had is to beef up Deploy-MSBuild.ps1 so that it detects core/full based on heuristics and picks itself. Maybe your "folder under sdk" is sufficient for that?