In VC++ 6 I could right click a function in Class View and delete it. It would comment out the definition and delete the declaration.
In Visual Studio 2013, that option doesn't appear for me in the context menu (right clicking a function in Class View) and I can't find anywhere else where I can do this.
Is there a quick way to remove a function in Visual Studio 2013?
Try go to the definition, right click the function and click that. If it doesn't appears try with the hotkey F12, maybe vs2013 still using that key to go to the definition of the method or variable.
Related
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.
I am trying to learn Visual Basic with the guidance of some YouTube Tutorials. They have recommended the use of Microsoft Visual Studio Express 2013 as it has a built in compiler. I encountered a problem where my toolbox bar on the left of my screen is empty. Does anyone know how to fix this?
http://gyazo.com/328ade3754613c971dd6d4745a0ed171 This is a link to my screenshot.
Just right click inside tools and click on "show all"
Your code may be running. Make sure to stop all processes and view the toolbox again.
On Visual Studio C++ 2012, it also happen sometimes. Try, to right click inside the Toolbox dialog and click on "Reset Toolbox" item. It should solve your problem.
See same question: How to rebuild the Visual Studio Toolbox?
What you need to do is to open your code in [Design] view. In this view you don't see the code as text, but rather as windows and buttons and so on.
Choose your favorite way to switch to the [Design] view :
A. View > Designer
B. Shift + F7
C. In the Solution Explorer window double click Form1.cs
Source:
How do I open a Visual Studio project in design view?
I moved from Visual Studio 2008 to Visual Studio 2010.
My code snippets work good in Visual Studio 2010 on the start of a line, but not when adding parameters to a methodcall. This did work in Visual Studio 2008.
So when i type this : "DoSomeMethod([nowiwantmycodennippets!]", the code snippets are not in the intellisense list.
Does anyone know if this is a setting, or just not working anymore, and if it can be fixed?
This appears to be bug. If you type your snippet name (i.e. noiwantmycodesnippets) and press ESC to dismiss the completion list (if open), then you can press Tab to insert your code snippet. So it's just a matter of the code snippets missing from the completion list.
You can use the Control+K, Control+X key chord to show the code snippets' list also. But this isn't as nice as using it through the completion list.
Are you using ReSharper? If so, Resharper Intellisense overwrites the VS default one, so that i.e. code snippets do no appear in the completions. Try turning off ReSharper Intellisense in the ReSharper Options (Environment->Intellisense->General, choose Visual Studio).
If ReSharper Intellisense is a must, you'll have to create a ReSharper "Live Template" which opens up for "code snippets" behaviour, only ReSharper is way more advanced -- see for example this one http://www.brianlow.com/index.php/2009/04/06/resharper-live-templates-for-nunit/.
On my machine I just type "public void Test(" and than ctrl+space and type the name of my snippet. Works like a charm. I've got the C# keyboard shortcuts, I think.
On top of visual studio code editor, There are two drop down lists displays list of classes and members in then selected class. See the picture below. What do you call them and what are the shortcuts? So that I can navigate to methods and members using keyboard.
I am using Vs 2010
Thanks
CtrlF2Tab gets you there. Take a look at this link. Is there a hotkey in Visual Studio to open the member drop down list?
Not strictly on topic but ReSharper has a shortcut for this Alt+\
Can use Edit -> Navigate to [Ctrl + ,]. or Solution Navigator in Vs Power Tools. But I am still looking for shortcut to access it directly.
Thanks
I guess it is Edit.ExpandCollapsableBaseTypeList (or something) in the Tools-Options-Keyboard.
If that doesn't work you can always record a macro and assign a shortcut key for that.
I'm a Java developer starting with .Net development using VS.Net 2008. I would love to get the Eclipse style of navigating methods etc by pressing the Ctrl key, hover over a method then click it to got to that method's declaration. Does such a plugin exist for VS.Net 2008?
thanks
To summarize In Visual Studio 2008, how can I make control+click do a “Go To Definition”?, you could either use AutoHotKey with the following script,
SetTitleMatchMode RegEx
#IfWinActive, .* - Microsoft Visual Studio
^LButton::Send {click}{f12}
or use ReSharper.
Two ways to go to a method's declaration:
Press F12 when the cursor is positioned in a call to the method.
Right click a call to the method and select 'Go To Definition' on the popup menu.