April 2010 - Posts - Jon Galloway

April 2010 - Posts

Visual Studio 2010 Zooming – Keyboard Commands, Global Zoom

One of my favorite features in Visual Studio 2010 is zoom. It first caught my attention as a useful tool for screencasts and presentations, but after getting used to it I’m finding that it’s really useful when I’m developing – letting me zoom out to see the big picture, then zoom in to concentrate on a few lines of code.

Zooming without the scroll wheel

The common way you’ll see this feature demonstrated is with the mouse wheel – you hold down the control key and scroll up or down to change font size. However, I’m often using this on my laptop, which doesn’t have a mouse wheel.

It turns out that there are other ways to control zooming in Visual Studio 2010.

Keyboard commands

You can use Control+Shift+Comma to zoom out and Control+Shift+Period to zoom in. I find it’s easier to remember these by the greater-than / less-than signs, so it’s really Control+> to zoom in and Control+< to zoom out.

Like most Visual Studio commands, you can change those the keyboard buttons. In the tools menu, select Options / Keyboard, then either scroll down the list to the three View.Zoom commands or filter by typing View.Zoom into the “Show commands containing” textbox.

Visual Studio 2010 - Zoom Commands

The Zoom Dropdown

If you forget the keyboard commands and you don’t have a scroll wheel, there’s a zoom menu in the text editor. I’m mostly pointing it out because I’ve been using Visual Studio 2010 for months and never noticed it until this week. It’s down in the lower left corner.

Visual Studio - Zoom Menu

Keeping Zoom In Sync Across All Tabs

Zoom setting is per-tab, which is a problem if you’re cranking up your font sizes for a presentation. Fortunately there’s a great new Visual Studio Extension called Presentation Zoom. It’s a nice, simple extension that just does one thing – updates all your editor windows to keep the zoom setting in sync. It’s written by Chris Granger, a Visual Studio Program Manager, in case you’re worried about installing random extensions.

Visual Studio 2010 - Presentation Zoom

See it in action

Of course, if you’ve got Visual Studio 2010 installed, you’ve hopefully already been zooming like mad as you read this. If not, you can watch a 2 minute video by the Visual Studio showing it off.

Posted by Jon Galloway | 10 comment(s)
Filed under:

Visual Studio 2010 / .NET 4 / ASP.NET 4 / ASP.NET MVC 2 Launch

Visual Studio 2010 and .NET 4 were released this morning. ASP.NET MVC 2 came out on March 11, but today’s a big deal for MVC as it’s now included “in the box” with Visual Studio.

There’s a ton of great information out there on Visual Studio 2010 and ASP.NET 4. As always, Scott Hanselman has a great rollup post with what’s new. Visual Studio 2010 Beta and Release Candidate builds have been publicly available since May 2009, so while hopefully there are very few real surprises. I tried to pick out some things you may not have seen yet.

Downloading and Installing

Kick the tires with Visual Studio 2010 Express via WebPI

Visual Studio 2010 Express is available via WebPI and is a quick, easy download. If you just want to kick the tires, WebPI is great because it just pulls down the bits you need vs. the ISO downloads which include the kitchen sink. As you can see below, the initial download is just 3.5 MB, and from there it just pulls down the minimal amount you need (vs. 2.2+ GB for the full Visual Studio 2010 Ultimate installer).

Visual Web Developer 2010 Express - Web PI

Do a custom install and just install what you’ll use

This is just personal preference, but I recommend doing a custom install and just picking the features you know you’ll use. James Senior just posted the settings he usually uses, and I agree. I’ve been doing minimal installs for a while, and it’s great not just because it makes the initial install faster, but because it reduces the frequency and install time for future updates, hotfixes and service packs.

If you do this, just keep the installation media (or ISO file) handy, and you can add on other features as you need them. Agile!

Note: In previous versions of Visual Studio, I occasionally got myself into trouble by forgetting to install Team Developer and Tester Tools and then wondering why MVC Test Projects wouldn't load, but test support is included by default in the Visual Studio non-Express SKU’s.

VS2010 - Small Install

Side-by-side means no hard decisions

  • Visual Studio 2010 works fine alongside Visual Studio 2008
  • .NET 4 installs side-by-side with .NET 2 and doesn’t auto upgrade your old programs
  • ASP.NET MVC 1 and ASP.NET MVC 2 don’t conflict

In general, you can install Visual Studio 2010 and .NET 4 without affecting your existing development and server environments, which makes both installation and gradual migration an easy decision.

Disclaimers:

  • Windows Phone 7 dev tools don’t yet work with Visual Studio 2010 RTM. This problem will go away very soon.
  • Silverlight 4 dev tools don’t yet work with Visual Studio 2010 RTM. This problem will go away very soon.
  • While you can use Visual Studio 2008 and Visual Studio 2010 solutions and projects on the same machine and can use Visual Studio 2010 Multi-targeting to work with .NET 3.5 applications in Visual Studio 2010, converting a solution or project file to Visual Studio 2010 format is a one-way trip. That means that you can’t have one project file that can be opened by both Visual Studio 2008 and Visual Studio 2010, which can be a bit of a pain for team development scenarios where some team-members are really lame haven’t yet installed Visual Studio 2010. The best workaround there is to have separate project files, e.g. MyApplication.2008.csproj and MyApplication.2010.csproj.

ASP.NET MVC 2 works with Visual Studio 2010 and Visual Studio 2008

I’m assuming you’ve heard this, but ASP.NET MVC 2 is…

What’s New Resources

Rollup lists

Feature specific

Some Personal Favorite Features

Summary

Install Visual Studio 2010 right away! What are you still doing here?

More Posts