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.24k stars 1.35k forks source link

[Broken Build]: What changed between 17.10.4 to 17.12.6? Our build is broken. #11019

Open nbevans opened 5 days ago

nbevans commented 5 days ago

Issue Description

We have a F# solution which is a mixture of net48, netstandard20 and some WebSharper 4.x projects. After installing VS 17.12 update this week, our team can no longer build the WebSharper projects. If we use the slightly older VS Build Tools LTSC 17.10.4 to run the build, the issue goes away.

Steps to Reproduce

The WebSharper (WsFsc) tool can no longer "see" the <ProjectReference>'s and thinks all the namespaces/modules/types in those assemblies are missing. The actual F#/FSC compilation itself is successful.

If I replace the SDK-style 's with the very old style of:

<Reference Include="MyProject">
    <HintPath>bin\Debug\MyProject.dll</HintPath>
    <Private>True</Private>
</Reference>

.. then the issue goes away - albeit then breaks other stuff in WebSharper's compiler but that seems unrelated to the initial problem.

It looks like this new version of MSBuild has broken something with older toolchains?

I've attached a binlog (.txt to get around file restriction)

sg.binlog.txt

Expected Behavior

<ProjectReference> should behave the same way it did on 17.10.4 when dealing with older toolchains.

Actual Behavior

When using MSBuild 17.12.6 the <ProjectReference>'s are not properly understood by WsFsc (WebSharper 4.x) post-compilation step. This is the step that converts F# code into JavaScript (if that's relevant).

Ask us questions

No response

nbevans commented 5 days ago

Reading through this https://github.com/dotnet/msbuild/blob/main/documentation/ProjectReference-Protocol.md - there could be any number of things here relating to this issue - certainly ProjectReference has had a number of changes made to it in recently MSBuild versions. Maybe some of the dynamic platform/targeting stuff is the root cause.