Friday, April 13, 2012 3:23 PM
I want to build a language service for visual studio 2010. I was first trying to follow the tutorial and documentations from MSDN.
The problem is i don't succeed to make this works (i'll explain later my problem). So i digged into existing implementations, i found Ook! and lua . both of these projects doesn't use the tutorial or documentation i found on MSDN, but something based on MEF. Lua used this only with previous Visual Studio versions.
So i'm wondering if i'm using an obsolete method to create a language service (But the documentation aims Visual Studio 2010), or there is different ways to do this, which depends on needs.
In my case, i've got a language that doesn't need to be compiled into cli, but i want to have an editor that have colorization, syntax warnings and errors, intellisense ...
The problem i mentionned is that when launching exp instance, there is no text editor with my file extension, and visual studio begins to have many lags. The language service is registered using 3 attributes : ProvideServiceAttribute, ProvideLanguageServiceAttribute and ProvideLanguageServiceExtension. Also initialized in Package intialize method, like mentionned in Proffer the Language.... The package is loaded when i try to open the file with my extension, the language service is initialized.
So i don't get it why i does not work, could you please help me to understand how language service works, and what is the best way to implement it
Monday, April 16, 2012 7:24 AM
Tuesday, April 17, 2012 7:16 AMModerator
Thank you for your question.
I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
Thank you for your understanding and support.
Lucy Liu [MSFT]
MSDN Community Support | Feedback to us
Friday, April 20, 2012 10:52 PMModerator
MPF is the Managed Package Framework, and basically consists of a series of assembly and helper classes that enable you to build a package for the VS IDE.
MEF is the Managed Extensibility Framework, which is a generic .NET library/framework for implementing plugins/extensions.
The latter is used by the new code editor in VS 2010, to allow for writing editor extensions. MEF wasn't around before VS 2010, and the VS 2010 code editor was entirely rewritten with WPF with the VS 2010 release. However, there are SHIM classes in VS 2010, to ensure existing language services still function properly.
Language Services not only provide intellisense and coloring (but can also implement other advanced features like support for code snippets, custom menu items, or add additional features like Tools.Options dialog pages, etc).
I think you'll find authoring and deploying an MEF based editor extension quite a bit easier. As for differences, I would suggest comparing the Ook Language Integration sample in the SDK samples pack with the Example.RegExLangaugeService sample included with the VS 2008 SDK, as these are somewhat comparable.