简体   繁体   中英

How to add your own extension in Visual Studio 2010 to the context menu of the html/aspx code editor?

I made my own extension for Microsoft Visual Studio 2010. Within my VSCT-file I defined a group for my command to add it to the context menu of the code-editor:

<Groups>
    <Group guid="guidUCCmdSet" id="UCMenuGroup" priority="0x0600">
        <Parent guid="guidSHLMainMenu" id="IDM_VS_CTXT_CODEWIN"/>
    </Group>
</Groups>

Thats working like clockwork but the new menu entry isn't visible in the HTML/ASPX and XML sourcecode editor. Unfortunately it's the place were the extension will be most commonly used.

So my question: How to enable my command also for the html/aspx sourcecode editor and - at the best - in the xml editor?

Thanks in advance!

OK, I found a solution after a lot experimenting. You have to use CMDSETID_HtmEdGrp as the GUID and IDMX_HTM_SOURCE_HTML or IDMX_HTM_SOURCE_ASPX as the ID for your parent node within the CommandPlacements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM