I'm attempting to create a Visual Studio/SSMS extension that adds a command/button to the context menu in the SQL Query Editor window. Initially, I tried using IDM_VS_CTXT_CODEWIN
. Although it works for new .txt
files, it's not effective for .SQL
files.
While researching this, I stumbled upon a suggestion to enable the 'EnableVSIPLogging' registry key to fetch more information about the context menu. Following that advice, Ctrl+Shift+RClick
on the SQL Editor window gave me:
Guid = {33F13AC3-80B4ECE-85BC-225435603A5E}
GuidiD 240
CmdlD = 80
Type = 0x00000400
Flags = 0x00000000
NameLoc = (null)
However, I'm not sure how to use this information to find the correct parent ID.
Below is the snippet from my .vsct
file:
<Group guid="guidColumnToCSVPackageCmdSet" id="MyEditorCtxGroup" priority="0x001">
<Parent guid="guidSHLMainMenu" id=""/>
</Group>
I'm also uncertain if the Parent guid I've set is even the correct one for this purpose. Can someone guide me on how to use the provided GUID and other details to add the command to the context menu in the SQL Query Editor window? Any insights or pointers will be appreciated.