Version Used: 2.9.0
Steps to Reproduce:
Update package Microsoft.CodeAnalysis from 2.8.2 to 2.9.0
Expected Behavior:
Updating meta package should not break things.
Actual Behavior:
MSBuilsWorkspace not found
Workaround: Reference new package Microsoft.CodeAnalysis.Workspaces.MSBuild explicitly
see discussion here: https://github.com/dotnet/roslyn/pull/21670
This was an intentional breaking change.
It would be nice to have TL;DR. According to this it should have been smooth process https://github.com/dotnet/roslyn/pull/21670#issuecomment-340312809.
Roslyn team should have a blog on msdn to announce such things and reasoning behind it.
Roslyn is a very powerful tool, but lack of documentation, breaking changes and issues on mac platform (although it mostly MSBuild related) really slows down its wide adoption.
@aka-STInG thanks! I'll see if we can get a blogpost out. Regarding your other comments:
lack of documentation
We have some docs here:
What more would you like to see in this area?
breaking changes
Other than this incident, what other breaking changes have affected you?
issues on mac platform (although it mostly MSBuild related)
We haven't solved using MSBuildWorkspace on .NET core but it should work under mono. Can you elaborate what the other issues are?
Here's an article-in-progress that describes things a bit better: https://gist.github.com/DustinCampbell/32cd69d04ea1c08a16ae5c4cd21dd3a3
According to this it should have been smooth process #21670 (comment).
Unfortunately, that PR contains a lot of discussion that diverged a bit.
@jmarolf
Other than this incident, what other breaking changes have affected you?
issues on mac platform (although it mostly MSBuild related)
We haven't solved using MSBuildWorkspace on .NET core but it should work under mono. Can you elaborate what the other issues are?
I was hitting same issue as described here
https://github.com/dotnet/roslyn/issues/20848 and here https://github.com/Microsoft/msbuild/issues/2554
This comment had the solution https://github.com/dotnet/roslyn/issues/20848#issuecomment-340294584
Now everything works. And big thanks for that solution!
This comment is about a year old, but I stumble upon it only now.
Should it be more straight forward that you have to set Environment.SetEnvironmentVariable("MSBUILD_EXE_PATH", msBuildDllPath); on mac and
Environment.SetEnvironmentVariable("VSINSTALLDIR", vs2017InstallDir);
Environment.SetEnvironmentVariable("VisualStudioVersion", @"15.0");
on windows for comlipation to actually work?
If you google this expressions they appear anywhere on the internet about solving issues with Roslyn, but in docs on github or in @DustinCampbell gist.
Most helpful comment
It would be nice to have TL;DR. According to this it should have been smooth process https://github.com/dotnet/roslyn/pull/21670#issuecomment-340312809.
Roslyn team should have a blog on msdn to announce such things and reasoning behind it.
Roslyn is a very powerful tool, but lack of documentation, breaking changes and issues on mac platform (although it mostly MSBuild related) really slows down its wide adoption.