简体   繁体   English

Roslyn-在Visual Studio 2010中使用VisualStudioWorkspace

[英]Roslyn - Use VisualStudioWorkspace in Visual Studio 2010

Is it possible somehow to use the VisualStudioWorkspace service, in an VsExtension that targets Visual Studio version 2010?( http://source.roslyn.codeplex.com/#Microsoft.VisualStudio.LanguageServices/Implementation/ProjectSystem/VisualStudioWorkspace.cs,e757fe6b8e91e765 ) 是否有可能以某种方式使用VisualStudioWorkspace服务,在2010年的Visual Studio版本?(即目标的VsExtension http://source.roslyn.codeplex.com/#Microsoft.VisualStudio.LanguageServices/Implementation/ProjectSystem/VisualStudioWorkspace.cs,e757fe6b8e91e765

I tried to import the service using MEF, as described at https://joshvarty.wordpress.com/2014/09/12/learn-roslyn-now-part-6-working-with-workspaces/ , but that's not working at all. 我尝试使用MEF导入服务,如https://joshvarty.wordpress.com/2014/09/12/learn-roslyn-now-part-6-working-with-workspaces/所述 ,但在所有。

[Import(typeof(Microsoft.VisualStudio.LanguageServices.VisualStudioWorkspace))] 
public VisualStudioWorkspace myWorkspace { get; set; } 

否。VisualStudioWorkspace仅存在于VS2015及更高版本中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM