vsct

How can I enable/disable command in Visual Studio 2017 VSIX C# project

◇◆丶佛笑我妖孽 提交于 2021-01-29 09:00:35
问题 I'm developing an extension for Visual Studio 2017 using a C# VSIX project. I need to create a variable number of commands based on settings in a .ini file. I thought to create a maximum number of commands (because in a VSIX project every command needs a new .cs file), and enable only the commands written in the .ini file. Unfortunately I don't know how to disable a command. I need to enable the commands when a boolean becomes true. I've seen that I need to use the OleMenuCommand class, but I

VSCT menu items not showing

狂风中的少年 提交于 2021-01-29 08:54:53
问题 Visual Studio 2019 16.5.0 preview 1. I'm trying to get my menu items to show up either in a group or on a different menu. Currently the menu items show up in the View/Other Windows menu on visual studio if I point them to IDG_VS_WNDO_OTRWNDWS1, but if I try to point them to MyMenuGroup, they just don't appear. The code will run but the menu items never show up on the menu. If I try to point the buttons to IDM_VS_MENU_EXTENSIONS, it won't even compile, giving the error below: Undefined 'Parent

How to create command menu item with checkbox?

不羁岁月 提交于 2019-12-12 21:15:51
问题 I'm writing a VSPackage and I need to have menu item with checkbox, just like on this sample image below: I went through this msdn reference regarding .vsct files, bud didn't fine any information explaining how to do it. What I have now is standard menu item with icon and text (code sample from MyPackage.vsct file): <Buttons> <Button guid="guidMyPackageCmdSet" id="cmdidMyPackage" type="Button"> <Icon guid="guidImages" id="myPackageBitmap" /> <CommandFlag>TextChanges</CommandFlag> <CommandFlag

Append item to Add menu of solution- or project node in Solution Explorer

牧云@^-^@ 提交于 2019-11-29 05:17:56
How can I add a sub menu for the Add menu item when right click on a visual studio solution explorer? I have to add a single sub menu item which will be displayed n right clicking the visual studio solution and move to the Add option in that menu. I am trying using .vsct (vs package). Please help me with valuable suggestions Matze Of course, there are similiar questions, but this seems to be a special case... In general, you need to know the menu´s command- and package id that you want to extend. I usually do this by enabling the EnableVSIPLogging option in the registry as described by this

Append item to Add menu of solution- or project node in Solution Explorer

╄→гoц情女王★ 提交于 2019-11-27 19:05:29
问题 How can I add a sub menu for the Add menu item when right click on a visual studio solution explorer? I have to add a single sub menu item which will be displayed n right clicking the visual studio solution and move to the Add option in that menu. I am trying using .vsct (vs package). Please help me with valuable suggestions 回答1: Of course, there are similiar questions, but this seems to be a special case... In general, you need to know the menu´s command- and package id that you want to