In the Visual Studio 2010 Customize->Add Command dialogue, I can select a command from a category. Given a command name, how do I know which category to look in? I want to add 'Selection Format' to my code window context menu but I can't seem to find it anywhere I look.
I don't know what process you can use to find out where it is.
I do know that it is in the Edit Category though.
Related
I want to build a Visual Studio 2017 extension that will help me automate a task. It will be available in the context menu (right click menu) of the code pane.
For that I need to recognize the method the cursor is pointing to, it's class, namespace and parameters. The documentation for doing that seems scarce.
Can anyone help me get in the right path to do this?
Thanks.
I am having trouble finding the right-click context menu in Visual Studio 2015. I know that nothing is wrong with my project or the file I am working. I can find the right-click context refactor menu in Visual Studio 2013. However, in Visual Studio 2015 there isn't a refactor context menu in the right-click context menu.
Where did it go? How do I get it back?
Your suggestion cannot include menu Edit → Refactor.
I have tried to reset my Visual Studio settings back to default using menu Tools → Import and Export Settings and that didn't bring the menu back either.
Some of the refactoring tools have been relocated or are at least accessible in a different manner than they were previously.
Using the extract method refactor as an example, you can still use this function; it is just not done the same as before:
Right click
Quick actions
Click extract Method
I think they've changed it to feel more "ReSharper"ey. All of the functionality should still be there however.
Here's more information on refactoring in Visual Studio 2015 - hopefully this helps! Refactoring (C#)
You no longer need to access the refactoring using the mouse right click.
It is recommended that you use the keyboard shortcut keys within Visual Studio.
For all possible shortcut keys, see Default Keyboard Shortcuts in Visual Studio, Refactor.
You might need to build the project to get it to work.
See Code Editing ASP.NET Web Forms in Visual Studio 2013 | Microsoft Docs. (If it is missing then the point is that I am using an example provided by Microsoft.). In Refactoring and Renaming see To extract a method in a C# page. When I follow the instructions I cannot find the feature to extract the code to a method. When I tried the Edit menu it said I did not have valid code. Then I built the project and the feature to extract the code was available and worked.
If you change the name of the object you are refactoring, the light bulb then appears to the left which asks if you wish to change the name of the object (i.e. refactor) or generate a new constructor for the new named object.
Ctrl + . is the shortcut key for extracting a method in Visual Studio 2015 and onward.
Ctrl+M, R does not work anymore in new versions.
Setting the icon for an application in Visual Studio is fairly straightforward now. But, is it possible to set a different icon for files (documents) associated with your exe?
I remember it being not that difficult on the Mac (years ago). Does anybody know the secret for setting a specific icon for a document that is different than for the application that it is associated with in Windows via Visual Studio 2010?
Thanks in advance!
Well, I stumbled upon the answer...
In Visual Studio 2010...
Right click on the project...
Select 'Publish' last vertical tab on the left.
Select the Options button (last of four buttons on the right).
Select 'File Associations'...
There you can select the Icon. Not exactly sure what ProgID is... I'll post, again, when I find out more. And some info about the ProgID is here. The 'short answer is' pretty much anything you want.
I expand it, but it collapses sometimes, and it gets very annoying. How do I make it always be expanded?
Visual Studio should always remember the last state of expansion of this options group box. If you can provide a set of steps that show a case where it doesn't, please drop me a line at mwthomas at Microsoft com as I'd like to take a look.
You use the CTRL+F key combination to open find options. If you want to open find dialog pop-up, you can use CTRL+SHIFT+F key combination. It is available all of Visual Studio versions.
Does anyone know if it is possible at all to filter the Toolbox's items in Visual Studio using an add-in?
Visual Studio 2010 introduced the ability to search but I want to filter, for example: type in button and it must show all items containing "button", same as on this on this Delphi XE screenshot:
This is a very good answer for this question. I copied from the VS blog:
In VS 2010 Beta2, we’ve added the ability to search for controls in the toolbox by name. To use it, put focus in the toolbox (by clicking in it, for example) and start typing the name of the control you want to find. As you type, the selection will move to the next item that matches what you've typed so far.
http://blogs.msdn.com/b/visualstudio/archive/2009/10/26/toolbox-search.aspx
This is something not possible as microsoft does not reveal the secret of adding toolbox controls details completely. They make change the process for each platform and for each versions of visual studio. if we have a clear details of how they add, we can also do the similar kind of small application with search capability and add it as add-in.
Luckily Visual Studio 2012 now has that feature!