I'm trying to get Workspace from visual studio to use it with roslyn.
I found some topics about that, like this one : How to get reference to 'Roslyn' Workspace object from IVsSolution?
I wrote exactly the same code :
var componentModel = (IComponentModel)Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SComponentModel));
var workspace = componentModel.GetService<Microsoft.VisualStudio.LanguageServices.VisualStudioWorkspace>();
But I get this error...
"No exports were found that match the constraint: ContractName Microsoft.CodeAnalysis.Workspace RequiredTypeIdentity Microsoft.CodeAnalysis.Workspace"
I don't really understand what's the problem.