问题
I have created a visual studio extension and have packaged it in visual studio setup. Now, when i install the setup, the vsix gets installed and is also seen in the Extension manager window, but its in disabled state. I have tried methods like adding registry entry for the extension and etc... but same was not useful.
回答1:
You should add ProvideAutoLoad
attribute to your package class and specify UI context when it's going to load. For auto-load vsix you should write sthm like this:
[ProvideAutoLoad(VSConstants.UICONTEXT.NotBuildingAndNotDebugging_string)]
public sealed class MyVSIX : Package
来源:https://stackoverflow.com/questions/13228178/how-to-programmatically-enable-visual-studio-extension