Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

Did you know that you can have multiple instances of the Solution Explorer open at once? It’s a feature that isn’t so obvious because there isn’t a button for it. It is listed on the Solution Explorer context menu but those menus have so many options it’s hard to notice them all. Here you can see that I’ve got a my Services project selected and I right clicked and chose “New Solution Explorer View”.

image

Now you can see that in Visual Studio I have TWO copies of the Solution Explorer open:

image

You can drag these windows around and dock them on opposite sides of VS or even drag the out or onto a different monitor!

Things can get really interesting here when you are working on really complex solutions. You can combine the various scoping and filtering options with the New Solution Explorer View feature too. In the next screen shot, I’ve got one Solution Explorer with my complete solution and one that is filtered to show only files that are open!

image

 

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.

 

Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

In a previous tip I talked about using some of the built in Filters in Visual Studio’s Solution Explorer. This is a similar feature. It’s one of those great ways to get rid of the “clutter” and focus on what is important. If you have a complicated solution, like I typically do, you’ll find this helpful.

In the screenshot you can see Visual Studio 2012’s Solution Explorer loaded up with the solution to my “Unit Testing Made Easy” demo. You’ll note that I’ve selected the Model project and right clicked to see the context menu. I’ve highlighted the option for “Scope to This”.

image

After clicking it, my solution explorer will now have the scope of just that project.

image

Presto… clutter removed. This doesn’t apply to just projects. You can “scope to” just about any item of folder in the solution explorer. As a matter of fact, once you have the Scope set, you can also applies those filters I mentioned before! And if you search (see my post on searching in Solution Explorer) in Solution Explorer, that search will have the new scope as well! There really are a lot of was to keep the solution explorer clean and clutter free.

Of course, the full solution can be brought back quite easily. Just click the home button to the solution explorer menu:

image

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.

 

Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

Quick Launch

Like many of the great new features in Visual Studio 2012, Quick Launch is easy to demonstrate. The latest version of Visual Studio has a lot of enhancements for searching from the Solution Explorer, the editor and other places. I like to think of Quick Launch as “Search for the menu system”. If you are wondering why you would need to search the VS menu, I’ll give you an example… You are debugging and you want to know what breakpoints are currently set. How do you open the breakpoint window? You know there is a menu option for it. Is it under View? Or under Windows? Acutally, it is off the Debug menu. But with Quick Launch, you don’t need to remember!

The Quick Launch tool is located at the top on the right side of Visual Studio. image

As you can see from the image, simply hit Ctrl + Q to put the cursor in the Quick Launch tool. Now type the name of what you are looking for. In this case, I’ll type “break” (I don’t necessarily need the whole word). Here are the results:

image

 

You can see that I got three results. The first is the one I wanted. But the others are helpful as well and are appropriate for the search terms.

 

 

 

Can’t remember how to open the immediate window? Type Ctrl + Q and “immediate”. Want to change the font size? Type Ctrl + Q and “font”. Play around with it get access to all kinds of features of Visual Studio. The most important part is to get used to using it. So instead of reaching for your mouse and clicking the menu, keep your hands on the keyboard and use Ctrl + Q.

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.

 

Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

 

How to Search in Solution Explorer

imageThe solution explorer in Visual Studio 2012 has a ton of new features. In this post, I’ll show one of my favorites: Search. It’s worth noting that there are a bunch of other new search features throughout VS 2012 as well. In the screen shot, I’ve circled the search area in blue. If you think that another search box in VS isn’t needed, just wait. The solution explorer search is different than the regular search that we are used to in Visual Studio. The normal search is a “text search”. Solution Explorer search is based on your file names, classes, and methods, but not local variables or plain text. I’ll show an example.

 

 

 

 

 

 

 

 

 

 

image

Note that in the screenshot of the code, I’ve underlined all the usages of word “Home” in several places: a comment, the class name, a method, a property, a class level variable (field) and a method variable.

 

 

 

 

 

 

 

 

 

imageHere you can see that I’ve searched for “Home” in the solution explorer. The results are shown conveniently right within the Solution Explorer (basically a filter). And in this case, the yellow highlighting was not added by me, VS highlights the text that matches the search. The search found the file, class, field, method, and property. It also found the folder named Home and the unit test too. But do you notice what is NOT shown? The comment and the string literal are not shown, neither is the method level local variable. This kind of search can be very helpful when you need to find things in your code but you don’t want to get caught up in all of the comments or commented out code.

 

 

 

 

 

imageLastly, I want to point out that you can even combine search with the other built in filters to Solution Explorer such as the Pending Changes Filter and the Open Files Filter. If you want to know more about those filter features, please see this post: Visual Studio 2012 Tip: Solution Explorer Filters

 

 

 

 

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.

 

Lately I’ve been speaking at local user groups about many of the exciting new features in Visual Studio 2012. Since there is so much to know and learn about VS 2012, I decided to create a collection of blog posts with many of the tips. This collection of posts will include features that are new to VS 2012 as well as some existing features as well. To view all of the VS 2012 tips posted so far, click here.

Some very useful filters in Solution Explorer

imageAmong many other great enhancements in VS 2012, the team really did a lot of work on the Solution Explorer. Is is packed full of goodies. Many of the new features in VS 2012 are designed to “get visual studio out of your way”. This feature is one example of how the VS team does just that. In complicated projects, the solution explorer can be a pretty crowded place. In the past, it was not always easy to find what you were looking for. Now, VS 2012 introduces filtering in the Solution Explorer. Today I’ll demo two options:

  • Pending Changes Filter
  • Open Files Filter

Pending Changes Filter

Often when I am working in VS, I want to know what files I have changed. And often, I continue to work in a bunch of files, going back and forth between them. Now, I can use the pending changes filter to tell Solution Explorer to only show the files that I have changed already! Easy, right? This feature is tied in with your source control system to figure out which files have changed.

Open Files Filter

Just like I said above, sometimes, the Solution Explorer can just be too crowded. One way I can filter it is to use the Open Files Filter. This is an example where the name pretty much gives away the ending. There isn’t much to say about this. It simply filters the Solution Explorer to only show the files I have open in the editor tabs.

In this example, I am choosing the Open Files Filter: image

In the screen shot below, you can see that after applying the filter, only two files are displayed in Sln Explorer. They are the two open files: HomeController.cs and AccountController.cs

image

 

I hope you find this tip helpful. To see more VS 2012 Tips, just click here.