In Visual Studio (2013/2015/2017), the Document Outline window for C# files is always empty ("There are no items to show for the selected document.").
It seems that this functionality is not (not yet / no more) implemented.
But then, how do I view the structure of the file? Is there any extension which implements this functionality?
showing only the selected/opened file
show regions
move/rename members
show documentation
Using the Solution Explorer and Class View are NOT the solution.
In the old Visual Studio 2003, I did use a self written Add-In, because it was easy to read the structure. (There were also other tools but I cannot find them anymore). So I ask here which solution you know. :-)
EDIT: Similar question also found:
How to show code outline in Visual Studio?
UPDATE: After 10 years the feature has finally arrived in VS 2022
This feature has been added in Visual Studio 2022 17.4.0:
You can now easily view a file’s structure at a glance in the Document Outline window. The Document Outline window displays the symbol tree of the file in the editor helping you quickly navigate and edit project files. You can open Document Outline by going to View > Other Windows > Document Outline or by using the shortcut Ctrl+Alt+T.
Update: This feature was disabled in v17.4.4 for the following reason:
After we released 17.4, we found some significant performance problems with the C# implementation of Document Outline that we didn’t catch during preview usage. We’ve temporarily disabled the feature, and are spending more time working on it to address these issues. These changes are larger than we’d usually like to include in a revision release, and need more bake time, so 17.4.3 [sic] onwards & 17.5 will both ship with the feature disabled. I know this is disappointing, but we have it back in no time and enabled in a future VS update.
There is also CodeMaid which provides the same functionality as JetBrains Resharper, but is free.
The best solution I found at present is:
JetBrains ReSharper (v8.0+) has a File Structure window which shows the structure of the current file as tree (types/members) and regions are also supported.
If you don´t have ReSharper, you can´t miss the Productivity Power Tools, made by Microsoft itself.
There's a specific version for each of Visual Studio versions. More info on these links:
VS2013
VS2012
VS2010
They have a feature called Solution Navigator
Also, there's this one that seems very interesting for bring alot of cool customizations to Visual Studio IDE, called VSCommands. It's worth to checkout their website => http://vscommands.squaredinfinity.com/features
It helps you look at the nested structure of certain types of files, e.g. windows forms designer file, open a form designer you should see all controls on the form shown in nested structure in the document outline window.
Related
When collapsing the XML comments for methods etc. It used to be that the summary was hidden. As I would like it to be. Then in VS2015 they broke this. I asked a similar question about VS2015 and got a nice workaround here - to use <para>.
The workaround continued working in VS2017 until now. Now I updated to version 15.5.1 and the workaround is broken, (why??...) and I can't find a setting to change that.
Is there one somewhere?
The way XML comments clutter up the code has always bothered me. In the past I've tried a few different Visual Studio Extensions and they've always sucked.
However, I just installed NoComment and it seems to do the job. I'm running Visual Studio 2017 version 15.7.3.
While I was looking for this I came across your question, so I thought I'd provide an answer. Hopefully you'll find it helpful :)
Since NoComment is no longer supported. I found Collapse Comments is the closest extension.
It works perfectly on Visual Studio 2019. It does a similar act of hiding xml comments. With options to hide small (single-line), long (multi-lines), and documentation (xml) comments.
Choose what you want to hide in the toolbar that you will see after installing the extension.
Click on the comment icon to show, click somewhere else and it will auto hide.
Quote of features the listed features by the developer in readme.md
Ctrl+M, Ctrl+C collapses all comments (and using/Import statements)
Ctrl+M, Ctrl+D expands all comments and closes all other areas
Works with C#, VB, and XML comments
Can also collapse (or expand) using/import directives
Can be configured to collapse comments when a document is opened
Does anyone know of an extension/add-in to visual studio 2015 that lets me mark two (different) files in solution explorer, right-click, and display the same Compare window used with source control?
I can use compare on one file and get the dialog window where I can replace the TFS path with a path to the second file, but this is a time-consuming operation as I tend to compare quite often (I have an external tool that updates two or more data files in my project).
I can recommend you CodeCompare.
The free version has a ton of features and has an amazing visual studio and eclipse integration. The option for comparing is mind bogeling. Trully amazing tool that actually also looks very nice.
It is a standalone tool, but also integrates seamless into VS
I'm looking how to inject my own page into VS2010 Tools->Options window in my open source project. ReSharper, VisualSVN and others are able to add their own page there and it seems like a natural place for settings. Unfortunately I'm not able to find any information or examples and I'm not perfectly familiar with the extension framework (been able so far to add my own tool windows, toolbars, menus etc.)
Any help would be appreciated.
Update: I've just got NuGet source code because they inject tool window too, trying to figure out how.
Check out the Visual Studio Extensibility samples on MSDN Code Gallery. Specifically, you'd be most interested in these:
VSSDK IDE Sample: Options Page
VSSDK IDE Sample: WPF Tool Window
You can find general information on getting started with the Visual Studio SDK here: http://msdn.com/vsx
I made an application at the office which runs a bunch of ProcessManager objects which themselves run a bunch of Process objects.
I have been thinking in creating a wizard to create automaticly the classes needed, but I want now to create a custom designer for creating and editing the classes. By designer, I mean like the LinqToSql designer and so on.
I wasn't able to find any information about it, or at least clear one. I've been looking at how to create a new editor for vs 2010 or add design-time ability, but none of theses researches helped me.
The ideal would be to have let's say ProcessManagerClass1.cs and ProcessManagerClass1.designer.cs and when opening the first one, it would open the custom designer.
Do you know how to do it and give me some links for tutorials or documentation??
Thank you for your help,
Vincent
I would start with the Visualization and Modeling SDK for Visual Studio 2010, which was formerly known as the Domain Specific Languages SDK. It is the way to create custom designers in Visual Studio. To use it, you first have to install the Visual Studio 2010 SDK (SP1 here, but you may have to run them in order, which means this first, then the Visualization SDK, then SP1)
I need to create a custom menu item for Visual Studio 2010 Add-in in C#, but I have had no luck in finding a solution for my needs.
I am aware that there was a similar post (Visual Studio Add-In - adding a context menu item to solution-explorer), but it did not help, as the blog follows the process through the integration package, and the video is done through VB. I had attempted to convert the VB syntax to the C# syntax, but about half way through the video, the Add-in methods has significantly changed from 2005 to 2010, as some of the methods have removed or changed.
Is there any good tutorials on making a custom menu item on the Solution Explorer in the lastest Visual Studio in C#, and is there a good website that could be used as a reference for looking over the VS add-in API? I've used Microsoft's main website, however it is confusing and wordy, which is difficult to understand and find the methods, properties, or commands that I am looking for.
Any help would be appreicated, Thanks in advance.
what are you writing? a number of cool add-ons already exist that might solve your problem..
such as vs 2010 Pro Power Tools
I don't know anything about it but you might want to check out MME MenuManagerTemplate and the sister project on CodePlex Managed Menu Extensions
Looks like the majority of the code is in the project on CodePlex so you could see how that project is implemented.