Bob Salita

For language services that use multiple file extensions, multiple extensions cannot be specified using a single ProvideLanguageExtension attribute statement. Instead, specify multiple ProvideLanguageExtension attribute statements.

ProvideLanguageExtension(GetType(LanguageService), ".myc1")
ProvideLanguageExtension(GetType(LanguageService), ".myc2")
ProvideLanguageExtension(GetType(LanguageService), ".myc3")

I believe the Language Service wizard is incorrectly putting multiple extensions on a single line (.myc1; .myc2; .myc3). That does not seem to work but multiple lines does. Perhaps this is a RegPkg issue.




Re: Visual Studio Extensibility Tip: Specifying Multiple File Extensions

Dmitry Pavlov

Hi,

I am also interested in the situation when we have the same extension which should be handled with two language service. I mean somethink like that:

ProvideLanguageExtension(GetType(LanguageServiceA, ".ext")
ProvideLanguageExtension(GetType(LanguageServiceB, ".ext")

How VS SDK team recommend to handle the situation

Thanks!






Re: Visual Studio Extensibility Tip: Specifying Multiple File Extensions

Craig Skibo - MSFT

You need to specify one ProvideLanguageExtension attribute for each extension that you support. We do have one wizard for generating language services, but it will only generate services for unmanaged (C++ code). Can you point us to the wizard you are using which generates the ProvideLanguageExtensionAttribute

As for specifying multiple language services for one file type, this is not possible. There can only be one language service associated with one file type.

Craig






Re: Visual Studio Extensibility Tip: Specifying Multiple File Extensions

Dmitry Pavlov

Hi Craig, < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

What can you advice for situation when the same extension is used for two versions of the same language What is the best way for resolving such situation and how to organize them As two separate packages or as one package... hmm... 

Please, any idea will be much appreciated.

Thanks! 






Re: Visual Studio Extensibility Tip: Specifying Multiple File Extensions

Bob Salita

Craig Skibo - MSFT wrote:

You need to specify one ProvideLanguageExtension attribute for each extension that you support. We do have one wizard for generating language services, but it will only generate services for unmanaged (C++ code). Can you point us to the wizard you are using which generates the ProvideLanguageExtensionAttribute

As for specifying multiple language services for one file type, this is not possible. There can only be one language service associated with one file type.

Craig



The wiz that generates multiple file extensions exists only in my imagination, apparently. In the process of translating C# language service examples to VB.Net, I fantasized that a future wizard would do all this work for me. I hope to post source to the language service in VB.Net in a couple months.

My language service needs the .Bas extension. Can you propose a best practice for expropriating .Bas extension from VB.Net's editor The issue is that my language service conflicts within the editor. While my language service colors my language's .Bas files, the VB.Net editor syntax scans .Bas files and puts in squiggles. I want to completely remove VB.Net from using .Bas. I tried removing VB.Net's Editor reg key but that causes VS to abort.







Re: Visual Studio Extensibility Tip: Specifying Multiple File Extensions

Dmitry Pavlov

UP

Dmitry Pavlov wrote:

Hi Craig,

What can you advice for situation when the same extension is used for two versions of the same language What is the best way for resolving such situation and how to organize them As two separate packages or as one package... hmm...

Please, any idea will be much appreciated.

Thanks!