Closed znakeeye closed 9 months ago
I'm running into the same issue.
15.1.0.0 is the correct version for modern MSBuild. How are you using MSBuildLocator? Was it succeeding in finding an installation with MSBuild? After the MSBuildLocator call, did you separate the MSBuild-related calls from the function that registers MSBuild?
fixed this by adding the following
<PropertyGroup>
<DisableMSBuildAssemblyCopyCheck>true</DisableMSBuildAssemblyCopyCheck>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" /> <!-- DO NOT UPDATE https://github.com/microsoft/MSBuildLocator/issues/210 -->
<PackageReference Include="Microsoft.Build" Version="17.7.0" />
</ItemGroup>
to the csproj
The issue seems to be not relevant anymore. Feel free to reopen if you still have any concerns.
I have referenced Build nuget packages as shown below. When I try to check in, my
Build
dependent unit tests fail on the build server.I don't get it. Where does this
15.1.0.0
version come from? Why can't it load the assemblies?