Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个 Visual Studio 扩展并将其打包到 Visual Studio 设置中。现在,当我安装设置时,vsix 已安装并且在扩展管理器窗口中也可以看到,但它处于禁用状态。我已经尝试过为扩展添加注册表项等方法......但同样没有用。
您应该将ProvideAutoLoad属性添加到您的包类并在加载时指定 UI 上下文。对于自动加载 vsix,你应该这样写:
ProvideAutoLoad
[ProvideAutoLoad(VSConstants.UICONTEXT.NotBuildingAndNotDebugging_string)] public sealed class MyVSIX : Package