-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use MSBuildWorkspace in .NET Core Console Application #28870
Comments
#17974 (comment) might help. |
Yep, not .NET Standard/Core yet (from the thread @Tornhoof linked):
|
Thanks @Tornhoof @daveaglick |
I’ll just leave this here: https://github.com/daveaglick/Buildalyzer/blob/master/README.md#roslyn-workspaces (be warned that version 1.0 with a totally refactored API is right around the corner) |
Today MSBuildWorkspace depends on the .NETFramework MSBuild. If you need something for .NET Core you can use AdHocWorkspace like @daveaglick has done on https://github.com/daveaglick/Buildalyzer |
Duplicate of #17974 |
@DustinCampbell Let me know if there's a better tracking issue for the xplat story of the new |
In case sometime finds this after some googling, to use MSBuildWorkspace on .net core you can follow these instructions: https://docs.microsoft.com/en-us/visualstudio/msbuild/updating-an-existing-application - essentially adding a reference to |
I'm moving a project from .Net Framework 4.6.1 to .Net Core and I have a problem with MSBuildWorkspace
Version Used: 2.7.0
Steps to Reproduce:
var workspace = MSBuildWorkspace.Create();
Expected Behavior:
MSBuildWorkspace should compile by using Microsoft.CodeAnalysis.MSBuild.
Actual Behavior:
Compilation error : 'MSBuildWorkspace' could not be found (are you missing a using directive or an assembly reference?)
Microsoft.CodeAnalysis.MSBuild
is not present under Microsoft.CodeAnalysis package.The text was updated successfully, but these errors were encountered: