The opinions expressed in these materials are my own and are not necessarily those of Microsoft.
Copyright © Microsoft Corporation. All rights reserved. Unless otherwise indicated, all source code provided is licensed under the Microsoft Public License (Ms-PL).
Well! I had an interesting night. As many of probably know by now we have four dogs at my house: Max (Basenji), Fibi (Jack Russell Terrier), Lily aka Piggy (we think she is a Pit Bull mix), and Zorro (Blue Tick mix). With four dogs you are always breaking up little fights between them at one time or another. Not sure if it is just our dogs or this is a normal thing.
Last night my dogs were in the backyard and I heard a little skirmish start. I did my usual yell to tell them to cut it out but this time Zorro kept making a funny noise like he was hurt. It didn't sound good at all. I went out side and found Max and Zorro attacking Lilly. Normally Lilly can handle herself no problem but she didn't seem to be fighting and it looked like Zorro had her around the neck.
As I approached and got Zorro to hold still I discovered that he had managed to get his lower jaw stuck in Lilly's collar. As I looked closer I found I was having a hard time getting Zorro lose so I brought them closer into the light near our porch. That is when I realized there was a bad problem. Zorro was really stuck and there was blood all over Lilly.
I called for my wife to come down and give me some help and she began looking for a flashlight to get a better idea of what we were dealing with. Right after she left, I noticed that Lilly had a funny look and realized she was choking--things were much worse than I thought. OMG. I almost freaked but held it together and called for my wife to bring me a knife (screw the collar, ill buy a new one). It was close but I managed to cut the collar off w/o cutting Zorro or Lilly. As soon as I cut them lose, I grabbed Lilly who had turned purple and had stopped breathing.
I didn't know you could give a dog mouth-to-mouth but my wife (freaking out) managed to say "give her mouth-to-mouth". Now, I have to admit, giving my dog mouth-to-mouth was not appealing to me but when you are faced with a purple dog you tend to not give a crap. I directed her to start the car so we could take Lilly to the emergency room and gave the the dog mouth-to-mouth.
It worked! I never, EVER would have thought you could resuscitate a dog that way but she started breathing slowly and we rushed her to the emergency room. By the time we got to the emergency room, she had completely restored breathing and was just a regular dog. So there we were in our pajamas with a perfectly healthy dog just wagging it's tail and having a good time. About 30 minutes and 95 dollars later we were on our way home and now we are looking for a new (hopefully safer) collar for Lilly. :P
Shoot me the URL to your blog and point out where you have linked to me. I will pick one lucky victim...er...winner to reward with a Visual Studio 2008 Backpack or 3 Visual Studio T-Shirts.
Menu: Project -> Add New Solution Folder; [Right-Click Solution] -> Add -> New Solution Folder Command: Project.AddNewSolutionFolderVersions: 2008,2010Published: 3/27/2010 Code: vstipProj0009
Did you know there are special folders to help you organize large solutions? There is! They are called, appropriately enough, Solution Folders. To create one just Right-Click on your solution (or go to Project -> Add New Solution Folder) and you will see this in Solution Explorer:
Simply give the folder a name and you are good to go. But so what? I mean, what can you actually DO with these things? Here is a list of stuff you can do:
Move or add projects to them. Solution Folders can be nested to create greater organizational structure.
Add, delete, or rename Solution Folders at any time, if the organizational requirements of the solution change.
Unload all projects in a Solution Folder to make them temporarily unavailable for building.
Collapse or hide entire Solution Folders so that you can work more easily in Solution Explorer. Hidden projects are built when you build the solution.
Build or rebuild all the projects. The projects are built in the order specified by the project dependencies.
Solution Folders are an organizational tool in Solution Explorer; corresponding Windows folders are not created. Microsoft recommends that you organize your projects on disk in the same way that you organize them in the solution. But that is your call :)
We all explore code and need to move quickly between files when examining code to get familiar with it or debugging or [insert file browsing scenario here]. In prior versions of Visual Studio you had to open a file to look at the contents which often resulted in many open files (tabs) when you were done. The Preview Tab eliminates the need to open files when browsing code. Most likely you’ll first encounter the Preview Tab when you are looking at files with Solution Explorer. When you click on a supported file type, you will see the contents of that file in the new preview tab (to the far right in the tab well):
If you click anywhere inside the file the tab will go from grey to purple to distinguish it from regular (blue) tabs:
Again, the point of the preview tab is to let you view the contents of a file without actually opening up a new tab in the tab well. As you look at different files the preview tab only shows the contents of the file you are currently on. This keeps the environment from getting cluttered with open tabs and allows you to focus on only those files that are interesting to you. Solution Explorer isn’t the only place you can use the preview feature. It turns up in several situations where you might need to look at file content. For example, when using Find in Files (CTRL + SHIFT + F) to locate information you will see the preview tab:
At some point you may decide to promote the preview to an opened tab in the Tab Well so you can do additional work on the file or just keep it around for other purposes. There are a few ways you can make this happen.
Probably the least useful and and least likely technique you will use is to click on the tiny Keep Open button on the Preview Tab. It’s not only useless it’s actually kind of annoying for some reason I can’t identify:
The most likely approach is you will just double click the file in Solution Explorer or whatever results dialog you happen to be in.
With the cursor inside the file (the tab is purple), just press CTRL + ALT + HOME to open a tab for the file you are currently viewing.
While previewing a file, if you make any change to the file it will automatically be promoted to an open tab so that you can make additional changes and do any other actions you need to perform.
Another button is useless and a waste of space on the Solution Explorer toolbar is the Preview Selected Items button. You can click it to preview the current file and its only use that I can find is if you turn off single clicking a file to preview it (see below). Also the tooltip would lead you to believe that you can select multiple files and preview them. Nope. Doesn’t work. Don’t waste your time with this button.
To see the options you have for using the preview feature, just type preview in Quick Launch (CTRL + Q) and click Environment -> Tabs and Windows:
This will take you to Tools | Options | Environment | Tabs and Windows:
To turn off the preview feature (NOT suggested unless you are having performance issues with it) uncheck the Allow New Files to be Opened in the Preview Tab option. Also notice you can decide if a single click open the files in for preview in Solution Explorer and Find dialogs. For Solution Explorer you can use ALT to prevent a file from being previewed when you click on it. While I see the value in using ALT to prevent preview from happening. I haven’t yet found any reason for turning off the single-click option as it, in effect, forces you to use the Preview Selected Items button which is a lot of extra work and kind of defeats the purpose of the feature.
The Preview Tab is one of my top two favorite features in Visual Studio 2012 (the other one being project round-tripping). You definitely want to leverage this feature to make your life easier.
This post is a bit overdue but better late than never. So let’s talk about Visual Studio Update 1…
Soma originally introduced Update 1 in his November 26th post here:
Since some of you may want to install this update immediately there are a few options for you.
From inside the IDE, go to Tools | Extensions and Updates:
Then look under the updates section and install from there:
If you want a more direct route you can click this link: http://go.microsoft.com/?linkid=9821199
You will get this dialog and can just click Run to execute the small .EXE and begin the online install:
Although many believe you can only install via online resources this is actually not true. A quick look at vsupdate_KB2707250.exe /? shows us the /layout switch:
So when I run vsupdate_KB2707250.exe /layout c:\ziptemp\vsup1 on my system this is the dialog I get:
This will download the source files to the designated location so you can make them available on a network share, thumb drive, or other media for stand-alone installation.
The most obvious question is, “Why should I care?” Despite the bug fixes and new features, this particular update represents a major shift in the timing for delivery. We have now committed to a shorter update cycle so we can deliver critical fixes and incorporate new features more quickly. What this means for you in real terms is that blocking issues may be resolved much more quickly and/or you will get a new feature that will help you get work done better/faster/stronger.
So what exactly did we deliver? Fundamentally there were two things we provided: Bug Fixes and New Features. You can find all the details here:
I’m going to repeat the bug fixes here and then address the new features in another article right after this one.
After an extended period of time looking for the list of bug fixes included in the package I was initially unable to find a comprehensive list anywhere. It looks like the team recognized there was a gap and updated the KB article on 1/13 to include all the relevant information. I’ll just repeat the information here verbatim for convenience.
Quick Housekeeping Note: I’ve deprecated the old Visual Studio Tips extension and have tried to get it removed from the gallery so it isn’t available anymore but have had little success. I am currently not planning to replace the tool with a new version but am open to suggestions as to a viable alternative. For now I suggest you use your favorite RSS feeder or visit the blog directly. Now on with the post…
With the BUILD conference (http://www.buildwindows.com/) just around the corner and lots of announcements coming I thought now would be a good time to pause the usual posts and talk about the next version of Visual Studio (vNext) and how you can prepare for some of the goodness to come. This is a high-level look at what is coming and I will be blogging in much more detail on the features throughout the vNext cycle. With that said, I’ve intentionally left out any images of the IDE for this post in favor of brief feature descriptions. Additionally, I will be blogging and tweeting directly from the BUILD conference while I am there to keep you up to date on the latest revelations that are coming out. To get a sneak preview of some of the features make sure to see the following video:
Visual Studio 2010 introduced a great new extensibility model that made custom additions very easy to make. You can find these extensions at the Visual Studio Gallery (http://visualstudiogallery.msdn.microsoft.com/) and, if you haven’t explored some of these great additions, I suggest you browse through the gallery to see the items there. When asked which extension I suggest everyone download the number one answer I give is always been the Productivity Power Tools (http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef?SRC=Home). Download it now. Seriously. Now.
We have (and will going forward) use extensions to field test new features that will be included in future versions of Visual Studio and it is a safe bet that some of the Power Tools will find their way into the vNext. If you watched the video mentioned above you will hear Weston Hutchins mention this as well. What better way to see what people want than to let them vote by actually downloading and using a feature? Granted it’s a little harder to focus on individual features when a lot are packed together but, even then, we get plenty of feedback on what people like and don’t like.
Once we get beyond VS2010 then we can start looking at the new features that have been publicly revealed so far. Here is a list of things you can expect in the next version:
One of the bigger pains in prior versions of Visual Studio is moving a project between versions. It was an all-or-nothing proposition typically due to schema changes to the proj files. If you opened a VS2008 project in VS2010 and converted it to the new project format then that project could no longer be opened in the prior version. For those that have experienced this you know this wasn’t entirely true and you could do a little proj file hacking to go back but it wasn’t fun or intuitive to do so. Visual Studio vNext will solve that issue. You will now have the ability to open a project in the new version of Visual Studio and still go back to prior versions. The net effect is you can have different teams on different versions of Visual Studio but still able to share projects with each other!
With the dizzying array of menu items, toolbar buttons, options, files, etc… it is often difficult to remember where a particular item exists. VS vNext adds the ability to quickly search the IDE for these things. A good analogy would be to compare it to the ability to search programs and files when you click on the start button in Windows. I don’t know about you but I don’t look for files anymore for the most part, I just hit my Windows key then type in what I am looking for then select what I want. Imagine that level of functionality inside the Visual Studio IDE and you have an idea of what this new feature does.
vNext supports creating new instances of Solution Explorer so you can have focused areas (one project in one instance and another project in a second instance) for working on multiple monitors. Additionally these instances can be nested inside windows that have been pulled outside the IDE for use on other monitors.
In the Productivity Power Tools we introduced the Solution Navigator with some cool new features that have found their way into the new IDE. The ability to drill down into the classes then members from Solution Explorer now exists. You can right-click, say, a method in Solution Explorer and see some new terminology: Calls, Is Called By, and Is Used By. Calls represents the call hierarchy for the method; Is Called By represents a list of methods that call the current method; and Is Used By represents all the specific file, line, and column positions where the method is mentioned.
Much like the new search for the IDE, we now have a new search for just the items in Solution Explorer. You can quickly type in a file, class, reference, etc… and see a filtered list in Solution Explorer of the items you are looking for.
A long-awaited feature that will collapse everything in Solution Explorer so you can expand items “fresh” as you navigate though the various hierarchies.
Another feature introduced in the Productivity Power Tools, this feature will let you keep interesting tabs surfaced on the left of the tab well while non-pinned tabs get pushed out of the visible area based on usage.
You can now rip off documents from the IDE and have multiple tabs grouped together in one or more floating tab wells. This is great for multi-monitor situations where you want groups of related files on separate monitors.
There is now a dedicated search box for the Toolbox window so you can quickly filter items to find the controls you want.
The most notable change to the Add Reference dialog is speed. It is way, waaaaay faster to add a reference with the new dialog than ever before. Also, a search box has been added to allow quick filtering of assemblies.
The Quick Find / Replace has been cleaned up and streamlined to make using the experience easier overall.
As with many other tool windows, the Error List window now sports a search box you can use to filter the list of errors, warnings, and information messages.
The Error List window also now supports a scope filter that lets you show only those items in Open Documents, the Current Project, or the Current Document.
Probably one of the coolest new changes is the Preview Tab. Essentially it allows you to look at a preview of a file and decide if you want that file to be opened up in the tab well. I’ll show much more on this feature later but wanted to mention it here to round out the list of items I will be covering in the short-term.
There are a lot of very cool changes coming in Visual Studio vNext. This post is meant to make you aware of the coming changes at a high-level to prepare you for a deeper discussion of each of these features in future posts.
Continuing on our odyssey of exploring the features in vNext, I thought we would look at some of the performance enhancements that have been publicly announced. Naturally, at this time, I can’t go very deep into the inner-workings of the improvements but will endeavor to list them out and explain somewhat based on information currently available. Also, be aware that this is a very early look at these features so there will be many improvements made as the product gets closer to RTM. I’m actually running two versions of vNext currently; the one that will be made available to the public as a pre-release at some point and the one we build internally so I have a pretty good handle on what you will see and what is coming out. I can say that there are some great things that are being done with the product you will definitely enjoy. With that said let’s take a look at some of the things we have revealed so far…
First off, if you haven’t seen it yet, most everything I mention comes from the great TechEd session done by Weston Hutchins that can be found here:
For vNext we are focused on four areas of investment to improve the product:
As I review the areas of improvement expect a great deal of overlap as many of the improvements fall into multiple categories. With that said, this area is pretty self-explanatory: We want vNext to enable users to quickly go about their work without waiting on the IDE. These improvements manifest themselves in a variety of ways but all have the singular goal of making the product more responsive. Below are some of the areas that address this goal that we have made public so far.
One of the IDE enhancements revealed so far is Add Reference dialog box. First and foremost it has been supercharged to load almost instantaneously. How? We index the assemblies beforehand to have a ready-made list on demand. We haven’t gone into detail yet on what exactly is being done but expect that revelation in due course. Also, as with most of the IDE, we have added the ability to search/filter the list so you don’t spend a billion years looking for the assembly you want.
We have moved some activities out-of-process to give control back to the IDE quickly. See Memory Utilization.
vNext will take advantage of multi-core systems much better than VS2010 which will result in more overall responsiveness. See Long Running Operations.
Building and debugging are examples of a long-running operations that we are addressing. For example, Visual Studio 2010, while a great improvement over previous versions, really doesn’t take full advantage of multi-processor machines. Our goal is to speed things up so you can get your work done faster with less time spent waiting.
Build operations have now been moved to background threads so you can actually do other things in Visual Studio while a build is happening.
Another great new feature is the ability to build projects in parallel. vNext comes with an option to have parallel project builds based on the number of cores your system has. In fact, the default value is automatically set to the max cores on your system. You can reduce this value if you want.
Responsiveness also includes the overall efficiency of Visual Studio. We are working on reducing the memory utilization overall based on usage.
vNext uses much less virtual memory internally. Much of this is due to running builds out-of-process (see below) as well as other enhancements we have made that haven’t been released yet.
C++ has had this feature for a while and we are now brining it to C# and, in a future release sometime after vNext, VB as well. We now perform builds outside the Visual Studio process. Instead of loading numerous referenced assemblies inside the VS process they are now loaded into an external process then discarded when we are done. This results in significantly less memory usage inside Visual Studio which results in a more responsive, stable product.
This one is really simple. How do we get the best information possible when there are issues with the product so we can continuously improve it for you? Solving for this question is never easy but we have devised ways of obtaining performance data from your actual use of the product to help strengthen our knowledge of areas that need to be addressed.
The number one tool you can download TODAY to give us feedback on VS2010 and vNext is PerfWatson. You can get it from the Visual Studio Gallery here:
This tool allows us to get up-to-date, immediate information on the issues that are impacting performance. This tool is currently built into the pre-release version of vNext and, I suspect, we will include it in the RTM version as well with an option for you to turn it off if you don’t want it.
If you haven’t gone to http://connect.microsoft.com/VisualStudio/ yet then you need to. This is one of the main ways we have been getting directed feedback from you for some time now. It’s a great way to get to see what others are saying and to communicate directly with the VS team.
So, someone thought it would be a good idea to give me some money for SWAG to give to my readers. Naturally, I loved the idea! So I went and bought a whole bunch of $100 ThinkGeek gift certificates. The problem is how to give them away? After much thought (about 10 minutes, at least), I figured the best way was to give them away whenever I felt like it.
Okay so there you have it. Beginning April 12th (Visual Studio 2010 Launch Day) I will be giving away ThinkGeek gift certificates. I’ll be picking people who show love for the Visual Studio Tips and Tricks blog. There are some basic ways you can do this:
Feel free to get creative and let me know about it. That’s pretty much it. Very simple really. Look for the fun to begin on Launch Day.
Keyboard: CTRL + WCommand: Edit.SelectCurrentWordVersions: 2008,2010Published: 4/5/2010Code: vstipEdit0039
Download the seriously cool Tip of the Day Extension to get the daily tips delivered to your Start Page!
You can easily select the current word in Visual Studio by simply putting your cursor in the word to select:
Then press CTRL + W and it will automatically select the current word:
Menu: Window -> Split Command: Windows.SplitVersions: 2008,2010Published: 3/5/2010Code: vstipEnv0004
Did you know you can split your windows? This feature has been available in a lot of Microsoft products for some time. You can simply go to Window -> Split on the Menu Bar or you can use this mouse technique: