Visual Studio Sidebar Navigation - visual-studio

I am looking for free extension that has one simple functionality which is sidebar file navigation like is in SuperCharger or Resharper (see attached screenshots). Sadly both of them are paid :-( Does anyone have a good alternative?

Visual studio has Class View window for a quite a while.

You can try Productivity Power Tools, with it, you can:
Expand code files to navigate to its classes, expand classes to navigate to their members, and so on (C# and VB only)
Search your solution, all the way down to class members
Filter your solution or projects to see just opened files, unsaved files, and so on
View related information about classes and members (such as references or callers/callees for C#)
Preview images by hovering over them, or preview rich information by hovering over code items
We've also added support for multiple selection and drag & drop.
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerTools

I know its an old question, but as i was looking for an alternative to supercharger // Resharper (for the navigation only) few days ago, and had looked on stack before doing my search (and as I found the answers not exactly what i was looking for) ...
After testing a few extensions I finally found a good alternative to those two paid solutions :
https://github.com/sboulema/CodeNav/blob/master/README.md
You can also just download it from the extensions menu , search for CodeNav .
Best.

Related

Unbind/unsynchronized scrolling in source control compare function

In compare option inside the source control, the scrolling is bind together for both files.
I want to scroll just one of the sides while the other stay pinned also I want to avoid comparing outside on the VS.
I can't find any solution online and there is no obvious option in the VS.
I'm Using VS2015 with TFS.
Thank you.
EDIT
New feature request for microsoft was opened
Feature request
EDIT
In VS1029 Version 16.11.3 feature exist, by pressing it you can unbind the windows
In compare option inside the source control, the scrolling is bind
together for both files.
For this , I am afraid this is by designed. The same is true for my test in visual studio2019.
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

Menu-commands extension for Visual Studio without command-table

I am building a Visual Studio extension (VSIX) with menu commands depending on the options for the extension. Its dynamic, what commands (how many) depends on the options.
I have a solution for it that uses the command-table, like: Dynamically add menu items
I would like to skip the command-table and build the menus totally programmatically, like: HOWTO: Package with commands created by code
The reason is to make it more dynamic. So if the user adds/changes/deletes in the options of the extension it would be handled dynamically (programmatically). On saving options the menu-command tree would be rebuildt. If I use a command-table I will have to add/delete nodes there to be able to solve it.
The thing I can not figure out is howto add the objects for "groups" and "menus" programmatically.
So I am out for the class/interface that has "AddGroup" or "AddMenu" as methods.
Is this at all possible or do I have to use the command-table? If it is possible I would appreciate links to code-examples for it.
Regards Hans
MVP Carlos Quintero has published sample code using IVsProfferCommmands3.AddNamedCommand that illustrates how to programmatically add menu items via the automation services (formerly utilized by the now discontinued add-in extensibility model).
https://github.com/visualstudioextensibility/VSX-Samples/tree/master/PackageCommandsCreatedByCode
While add-ins are no longer supported, the automation interfaces are still present. So you can use these, bearing in mind these menu items (aka commands) are temporary.
Also, the sample code here is a little outdated, using Package instead of AsyncPackage, and ProvideAutoLoad attributes. So you'll also want to read up on the following:
https://github.com/microsoft/VSSDK-Extensibility-Samples/tree/master/AsyncPackageMigration
https://devblogs.microsoft.com/visualstudio/updates-to-synchronous-autoload-of-extensions-in-visual-studio-2019/
Sincerely,

WP7 / WP8 - Apply text styles

As you know, in Windows Phone SDK there are several styles that you can apply to textblocks.
For reference: MSDN
Since you can't always remember the full name of the style, is there an easy way to apply them? Do I really have to go to that link everytime I need to apply a new style?
IntelliSense is not helpful enough? I usually, write StaticResource text and then the list gets filtered with all the styles containing the "text" string. Kind of depends according to your needs. If you want to apply for font style, write "font" and see the list of suggestions.
Now, I'm not sure if my IntelliSense is as yours or is already enhanced by Resharper. If you haven't heard of it, take a look at it. You gotta hit CTRL+SPACE if the suggestion list isn't there, and it will get filled with possible matches. It's a nice productivity tool that does MUCH more and actually is not free but, I guess you could also get it crac... ahem :)
Other than this, I guess a quick bookmark to that web address, does that job pretty well. :)
The easiest way is to ensure you have the visual designer open while creating the view. You can right click on your TextBlock select Edit Style -> Apply Resource ->. From here you will see a long list of available styles to pick from.
I just found out that what I was looking for will be implemented in Visual Studio 2013!
Here you go: http://blogs.msdn.com/b/visualstudio/archive/2013/08/09/xaml-editor-improvements-in-visual-studio-2013.aspx

How can I write a plugin for VS2010 using MEF?

I've seen lots of MEF code for plugging into custom apps, but I am yet to find out how to write a plugin for VS2010 using MEF. I was under the impression that the new IDE supported this.
Does anyone know if this is supported 'out of the box', or does it require an install. Does anyone have any links, tips, etc to get me started.
MEF is the primary extension mechanism for extending the editor. If you install the SDK, there are a few new project samples set up to create editor extensions, found under C# (or VB)->Extensibility. These include:
Editor classifier – for providing syntax highlighting
Editor margin – putting a margin along the sides of the editor, with arbitrary WPF content
Editor text/viewport adornment – for putting WPF visuals into the editor
You can find overview documentation on MSDN: Extending the editor, and Editor extension points.
Some samples you may want to look at: editor samples on code.msdn.microsoft.com, a couple more on editorsamples.codeplex.com, and the source for all the samples I've written.
I blog about writing editor extensions. On there, you can find descriptions of most of the extensions I've written, along with more general posts about performance, design of the new editor, etc.
Questions posted on the editor forum on msdn also are answered by various members of the editor team.

Browsing Classes, Objects, etc

Question ONE:
I'm still pretty new to .net, but have used Visual Studio for a few recent projects. I'm now working a new project and I was wondering if visual studio had anything built in that would allow you to browse all of the details about a control, etc..
Is MSDN the best place to go for this?
For instance if I wanted to see of all the methods, properties, etc.. Is there anything inside VS?
Question TWO:
Can anyone recommend, books, resources, that deal specificially with Visual Studio? What each window does, etc.. I have used it enough to complete a few projects, but I haven't seen much in the way of exactly what everything does and why.
Thanks for any suggestions.
Use reflector (it's free!) to get in-depth information about classes etc. Visual studio also has a built-in Object Browser.
P.S. Reflector allows you to reverse engineer assemblies as well, allowing you to view the actual code of a class / method.
P.P.S. Google is still a developer's best friend. Need information on a control, search for it on the web. (Which will lead you to MSDN a lot of the times, but will also get you examples and loads of blog entries).
Question ONE:
You can use the Object Browser (menu View\Object Browser) to see a hierarchical list of all known assemblies, classes, interfaces, enums, etc...
This only gives the signature of each item and not the code.
If you want to see the code, use .Net reflector.
You can also use the Object Browser in Visual Studio. There is usually an icon for it at the top (by the Toolbox, Solution Explorer, etc. icons) or you can navigate to it (View -> Object Browser). When it opens, you will see all of the libraries currently referenced (system and third party) on the left hand side. It's hierarchical, so you can start drilling down. There is a search box at the top, if you want to look for a particular class, method or library. That looks at all the system libraries, not just the ones referenced in your current project.
For more help with the object browser, look here.
Q1:
In Visual Studio:
Above the editor there are 2 dropdown lists:
Left: Shows Classes
Right: Shows Class Members
or Click View > Class View: to see all the classes in the whole solution
I had a similar rub when I started using VS after I had done a lot of Java coding. I was used to the Java API documentation to research properties and such.
I found the VS equivalent IMO, here:
http://msdn.microsoft.com/en-us/library/ms229335.aspx
You can browse every class method, property, constructor, etc. right there. Their examples are decent.
In response to question 1, what I usually do is highlight the bit of framework code I'm interested in and hit F1 to bring up the documentation. For example:
Button myButton = new Button();
If you highlight the first Button and hit F1, you'll get an overview on Buttons in Windows Forms. If you highlight Button() and hit F1 you'll get the documentation on the Button class constructor.
In response to question 2, I'm not sure a book is the answer. I think reading a book on all the components of Visual Studio might be overkill. I'd say to keep on hacking away at your projects and page-fault information in via MSDN, Google, and StackOverflow as you need it. As with any IDE and framework, the more you use it the better you'll get at navigating and learning the ins and outs.

Resources