Open benjamin-asdf opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Could you provide all the code required to reproduce this? Probably the best option is to create a GitHub repo or attach a zip file here.
Turns out this is fixed with these versions:
<PackageReference Include="Microsoft.Build" Version="17.4.0" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.5.5" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.4.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.4.0" />
it was an older combination of versions that made the error.
<MicrosoftBuildLocatorVersion>1.2.6</MicrosoftBuildLocatorVersion>
<MicrosoftCodeAnalysisVersion>3.6.0</MicrosoftCodeAnalysisVersion>
<MicrosoftBuildVersion>16.5.0</MicrosoftBuildVersion>
Version Used:
4.4.0
Steps to Reproduce:
this registers
/usr/share/dotnet/sdk/7.0.100/
The essential thing for me is chsarp 9 language features.
GetCompilationFromSolution
TestProj.csproj
TestProject.sln
Program.cs
Expected Behavior:
Better error that tells me for example
Maybe this could say "consider installing sdk XXX and make sure you are registering the instance"
Actual Behavior:
There is a hard to understand low level error
It already took me shit tons of sweat to understand this has something to do with
MSBuildLocator
.