Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Friday, January 9, 2009

Visual Studio and Auto Toolbox Populate

When I began working for my current employer, I joined the largest .NET software project that I have worked with to date. One of our standards is that virtually every UI element is contained within it's own user control. This makes for great re-usability however, it causes increased build times because each build caused the controls within Visual Studio's toolbox to be refreshed. I was told that there was no way around this, and I just assumed that this was correct. However, recently during what felt like a rediculously long wait for a build to complete, I decided to research the issue. Wouldn't you know it, I stumbled across an old post from ScottGu that mentioned an AutoToolboxPopulate setting (along with lots of other useful information). Setting "Tools --> Options --> Windows Forms Designer --> AutoToolboxPopulate" to False prevents the Toolbox from being populated with each build, and has dramatically improved my build times.

The only drawback to setting this to False, is now your user controls will not automatically appear in the Toolbox. At first, I found myself enabling/disabling the setting depending on if I needed to work with UI elemenets, or not. But, then I discovered a function under the Project menu, "Refresh Project Toolbox Items". This allows you refresh Toolbox on demand, instead of with every build. Problem solved.

Thursday, August 14, 2008

Shortcuts revisited

Two days ago, I posted about some of my favorite keyboard shortcuts. Coincidentally, yesterday I was catching up on my podcast listening, and Hanselminutes #125 is an interview with Saqib Shaikh, a blind developer with Microsoft Consulting Services in the UK. Without sight, Saqib is unable to use the mouse, so he must make extensive use of keyboard shortcuts. I have trouble remembering twenty, or so, shortcuts and can’t imagine what it must be like to need to remember them for almost every task. If you haven’t heard the podcast, check it out. It makes you think about the overall development experience, and you might even pick up a few new shortcuts (how many people knew that Ctrl+Shift+Esc opened the task manager?).

Tuesday, August 12, 2008

Favorite Shortcut Keys

Like most developers, I make extensive use of shortcut keys. However, I seem to only have the mental capacity to remember 20-30 at one time. So, I have a tendency switch them in and out of my regular rotation depending upon what type of project I am working on. Here are the ones that I get the most use out of:

Visual Studio
(Note: some of these are different dependent upon your installation settings)
Control + g : Goto line number
Shift + Alt + Enter : Toggle full screen mode
Control + Space : Launch intellisense
Tab : Accept intellisense selection
F5 : Start debugging
F6 : Build
F10 : Step Over
F11 : Step Into

Windows
Windows Key + f : Search for documents
Windows Key + r : Run
Windows Key + m : Show the desktop (minimize all applications)
Alt + Tab : Toggle between applications

Most applications
Control + s : Save
Control + c : Copy
Control + v : Paste
Control + z : Undo
Control + n : New document
Control + x : Cut
Control + a : Select all
Control + h : Replace
Control + f : Find
Control + Tab - Toggle between documents

Monday, May 5, 2008

C# Code snippets

While making the transition from a VB.NET developer to C#, I noticed that there are far fewer out of the box code snippets for C# than VB.NET in Visual Studio 2005. A quick Google search for C# snippets revealed that Microsoft offers a separate download for C# snippets which matches all of the ones available for VB.NET. This was great news, but unfortunately the download link appears to be broken at the moment. I'm sure this will be fixed soon but in case it's not, Jeff Atwood has posted the snippets and helpful install info here.