You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I thought I would try again with VS2022 and the community toolkit, but getting the same result where the icons appear correctly in the Customize dialog, but not on the menu...
For the above test I created a new "VSIX Project w/Command (Community)" project, that when tested displays the Tools→MyCommand icon correctly.
Then I copied the MyCommand 'Button', and changed the bare minimum using the cmdidCopy command details in the VSSDKs ShellCmdDef.vsct file (as per GUIDs and IDs of Visual Studio commands)...
Note that the 'ButtonText' I set above is ignored in both menu and Customize dialog (although perhaps this behaviour can be changed by one of the CommandFlag elements).
I also copied the cmdidPaste 'Button' from ShellCmdDef.vsct verbatim, only adding a 'Parent' and changing the icon (copied from cmdidFileNew also defined in ShellCmdDef.vsct)...
Not sure what the 'AllowClientRole' CommandFlag does - it's undocumented in the Command flag element reference.
I "Reset the Visual Studio 2022 Experimental Instance" between tests
I deleted "%LOCALAPPDATA%\Microsoft\VisualStudio\17.0_8548fb75Exp"
I later unsuccessfully tested installing the VSIX directly to VS2022 (instead of debugging via the Experimental Instance).
Built-in commands that don't have a default icon (such as Edit → Advanced → Toggle Line Comment), display no icon in the menu (but again it appears correctly in the Customize dialog)
(off-topic) None of this would be an issue for me if the toolbar icons were not a miserly 16px (why so small with monitors >> 2000px high in 2022)!??
Any suggestions?
(Edit):
VS2022 v17.0.5 on Microsoft Windows [Version 10.0.19043.1466]
Community.VisualStudio.VSCT {16.0.29.6}
Community.VisualStudio.Toolkit.17 {17.0.394}
Microsoft.VSSDK.BuildTools {17.0.5234}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to add a button to my extension menu for the VS built-in Copy command, but with a different icon.
I had a similar issue on VS2019 that I never resolved:
https://stackoverflow.com/questions/62591910/implementing-new-icons-for-built-in-commands
So I thought I would try again with VS2022 and the community toolkit, but getting the same result where the icons appear correctly in the Customize dialog, but not on the menu...
For the above test I created a new "VSIX Project w/Command (Community)" project, that when tested displays the Tools→MyCommand icon correctly.
Then I copied the MyCommand 'Button', and changed the bare minimum using the cmdidCopy command details in the VSSDKs ShellCmdDef.vsct file (as per GUIDs and IDs of Visual Studio commands)...
Note that the 'ButtonText' I set above is ignored in both menu and Customize dialog (although perhaps this behaviour can be changed by one of the CommandFlag elements).
I also copied the cmdidPaste 'Button' from ShellCmdDef.vsct verbatim, only adding a 'Parent' and changing the icon (copied from cmdidFileNew also defined in ShellCmdDef.vsct)...
NB:
Any suggestions?
(Edit):
VS2022 v17.0.5 on Microsoft Windows [Version 10.0.19043.1466]
Community.VisualStudio.VSCT {16.0.29.6}
Community.VisualStudio.Toolkit.17 {17.0.394}
Microsoft.VSSDK.BuildTools {17.0.5234}
Beta Was this translation helpful? Give feedback.
All reactions