November 2007 - Posts - Jon Galloway

November 2007 - Posts

Ten Tips for a Happy Upgrade to Visual Studio 2008 (Release)

Visual Studio 2008 has been out for over a week. I've upgraded three machines (two Vista, one XP) from Beta 2 to RTM, then upgraded a couple of projects. I've also been watching blog posts and listening in at the Twitter water-cooler to hear about other developers' experiences, problems, and recommendations as they go through the upgrade experience. So, here's my quick guide to a smooth upgrade to Visual Studio 2008.

1. Carefully Uninstall any Pre-release Bits First

If you've installed any previous versions of .NET 3.5 or Visual Studio, you'll need to make sure you've fully uninstalled all the pre-release bits before starting the Visual Studio 2008 install.

As Rick Strahl writes, it's best to close as many programs as much as possible before starting the uninstall. Rick and I both got some strange prompts to close programs during the install (including prompts that the uninstall program needed to be closed for the uninstall program to continue). First, close everything on the following list if possible:

  • Close all MS Office applications (Outlook, Word, etc.)
  • Close Internet Explorer (printing this first if necessary)
  • Close all open Explorer windows
  • Close everything else that you don't need open

Note: I know this sounds like voodoo advice, but the idea is to minimize the chances that the uninstallation programs will try to access a file, find it's in use, and tell you that you need to reboot to complete the installation. Remember that we're talking about the .NET framework and Visual Studio (which includes Visual Studio Tools for Office), so you really do want to close down as much as you can.

Now, if you get a prompt to close programs during the uninstalls you can probably get past it by just selecting Retry. If not, click Ignore and reboot after the uninstall completes.

It's very important to get everything uninstalled before you start installing Visual Studio, or you can end up with a failed Visual Studio 2008 install that leaves things in an in-between state that's a pain to clean up. Scott Guthrie posted a full list of software you'll need to make sure is uninstalled. His uninstall order works, but as Rick and others have found it's not the fastest way to get everything removed. I've compiled info from posts by Rick Strahl, Julia Lerman, Paul Glavich, and Scott Guthrie, as well as what's worked for me; here's what I believe to be the best way to do the uninstalls. Note that if any of the items on the list aren't installed, you can move on to the next one.

  • Uninstall Hotfix for Microsoft Windows (KB110806)
  • Uninstall Hotfix for Microsoft Windows (KB930264)
  • Uninstall Hotfix for Microsoft Windows (KB929300)
  • Uninstall Microsoft SQL Server Compact Edition 3.5
  • Uninstall Microsoft SQL Server Compact Edition 3.5 Design Tools
  • Uninstall Microsoft SQL Server Compact Edition 3.5 for Devices
  • Uninstall Microsoft .NET Compact Framework 3.5 Pre-Release
  • Uninstall MS Document Explorer 2008
  • Uninstall MS Visual Studio Web Authoring Component
  • Uninstall Crystal Reports for VS2008 Beta 2
  • Uninstall MSDN Library for VS2008 Beta 2 (If you forget, you'll get a friendly reminder when you try to install Visual Studio)
  • Uninstall V2008 Beta 2
  • Reboot

Now, do a final check to make sure you don't have any of the items on Scott's list remaining1.

Steve Harman has a nice tip on using Vista's search integration to make this easier: type the first few characters of the program you're uninstalling in the search box in the upper right corner to filter the list:

2. There's more than one Visual Studio 2008 Download Link. Choose Wisely!

As Julia Lerman writes, you need to get the right download:

One thing to watch out for is where you download from. On the home page of the subscriptions (when you are logged in) there is a list of popular downloads. Trying to download from there will use a downloader that cannot stop and resume (or resume if there's an error). Go in to the "downloads and product keys" area of the site and download from there. Depending on your subscription level, you may or may not have this option if the product related to your SKU has not been made available yet. They are getting up there little by little though. But downloading from this area uses the nice download app that lets you stop start and resume downloads.

That makes a big difference - I read several complaints over the past few days from people who kept having downloads time out at 90% or so. With the download app, the download will automatically resume where it broke, and with a 4GB download that's something you'll want to get right.

When you're done, you'll have a 4GB file - the file I got was en_visual_studio_team_system_2008_team_suite_x86_x64wow_dvd_X14-26461.iso. It's a good idea to burn the install to a DVD, but if you're installing from an ISO image, I recommend both PowerISO and Daemon Tools to attach the ISO file as a virtual drive.

2. Only Install What You'll Actually Use

It's tempting to want to install everything, just in case you need to do VB Smart Device programming or debug a C++ VSTO app, but resist the urge. A minimal install will save you several gigabytes of disk space (as you can see from the screenshots below), but that's not the reason I'm recommending this. Rather, install only what you'll use because it will make makes service packs and hotfixes install a lot faster.

I recommend keeping the installation media available so you can install other features later if you find that you'll need them, then to install only what you really need. Here's the "kitchen sink" list (which I don't recommend):

Visual Studio 2008 - Full Install

Here's my list after I pruned it down to what I actually use:

Visual Studio 2008 - Simple Install

Your list will be different, but the result should be similar. Don't bother with Crystal Reports or Dotfuscator Community Edition unless you've used them lately. If you haven't programmed in C++ in the past two years, leave it behind. And while I know some folks like to have the MSDN libraries installed, I'm not one of them. I find the integrated help a lot less useful than just Googling with a site restriction. For instance, if I want MSDN info on InsertAllOnSubmit, I search with this: InsertAllOnSubmit

Note: This is especially important if you're setting up a virtual machine. A "kitchen sink" install will probably weigh in at about 10+ GB, while a minimal install will be about 6GB. Once you optimize and compress them, the full install will still be between 6 and 8 GB, while the minimal install should be small enough to fit on a standard 4GB DVD, and will copy across the network a lot faster.

3. Don't Get Fooled by the Early Reboot Prompt!

The Microsoft .NET Framework 3.5 installation will prompt you to reboot part way through the installation process. Aaron Stebner has written a detailed description  of the issue, as well as how to suppress the prompt in your redistributable applications, but the bottom line is that you should postpone all reboots shown during the Visual Studio 2008 installation until after the installation has completed. When you see the following prompt, click the Postpone button.

Note that the case that Aaron documents is only in Windows Vista. However, since the root cause is due to reboot prompts from Hotfixes to .NET 2.0 or 3.0, it seems possible that variations of this could affect installations on XP or Windows Server 2003. I have heard of early reboot prompts in XP; whether they're due to this exact problem or something else isn't clear. The rule of thumb, though, is that you shouldn't reboot in the middle of an install.

4. If you use Team System, install the Team System 2008 Team Explorer

When you install Visual Studio Team System, you might make the assumption that your Visual Studio installation will be able to talk to a Team Foundation Server for source control. That assumption, while logical, is not correct. In order for Visual Studio to connect to TFS, you need to install Team Explorer.

Gripe: Yes, this is totally silly. I think the idea is that Team Foundation Server is a product, so the "client access" bits are shipped with the server. This might make sense to someone with a product strategy title, but it doesn't make any sense to us developers. Which is why I keep a Post-It note reminding me to get the Team Explorer when I install VS - right next to the Post-It that says "First pants, then shoes." 

The documentation tells you to get the Team Explorer from the TFS installation media, but that download is another 3GB download. The easier way is to grab the standalone Team Explorer install, which is only 387 MB.

Gripe: The TortoiseSVN install is under 9MB. I know that Team System does more than just source control, but it'd be cool if there was a Team System SSCLI interface that didn't require a 400 MB installation.

5. Reset your IDE Settings after the Install

If you've used any of the pre-release builds of Visual Studio 2008, you should reset your Visual Studio settings, or you can end up with some strange configurations with VS windows hidden or docked strangely. You can do that by running /ResetSettings, or you can reset settings inside VS.NET 2008 from the Tools menu: Tools > Import and Export Settings... > Reset all settings.

6. Take this opportunity to Change Your Visual Studio Theme

This step is optional, but I think a product upgrade is a great time to modify the theme. Visual Studio has a great theme system which allows you to try out a new theme and revert if you don't like it.

I'm a big fan of Rob Conery's TextMate theme:

If you don't like that, though, there are plenty of options that are better than the defaults. A nice place to shop is at Is My IDE Hot Or Not. This may sound like silly tinkering, but it's not at all. You're going to spend hundreds of hours staring at that Visual Studio 2008 IDE, right? Take 10 minutes to adjust it to something that's easy on your eyes.

7. Breaking changes to the ASP.NET ListView

If you've written any code using the pre-release ASP.NET ListView, you'll need to upgrade your markup. There's one real difference, with a few different effects - container elements have been replaced by asp:PlaceHolder controls. Previous versions allowed you to use any runat="server" tag as a container element. I like the RTM behavior a lot better - the old approach was a little too "magic" at times, cramming child elements into parents depending on ID's. The new usage is more explicit, and it's more obvious what's your markup and what's being substituted in by the ListView.

Specifically, instead of an element named ItemContainer, you now need a Placeholder named ItemPlaceholder. If this is incorrect, you'll get the following error message:
An item placeholder must be specified on ListView ‘SampleListView′. Specify an item placeholder by setting a control’s ID property to “itemPlaceholder”. The item placeholder control must also specify runat=”server”.

Similarly, instead of an element named GroupContainer, you now need a Placeholder named GroupPlaceholder. If this is incorrect, you'll get the following error message:
A  group placeholder must be specified on ListView ‘SampleListView′ when the GroupTemplate is defined. Specify a group placeholder by setting a control’s ID property to “groupPlaceholder”. The group placeholder control must also specify runat=”server”.

For example, this ListView with a group template and generated markup in Visual Studio Beta 2:

<table id="containerTable" runat="server" class="sample-list">
<tr id="trGroupRow" runat="server">
<td id="tdGroupCell" runat="server">
<table id="groupContainer" class="group-style" runat="server" />
<tr id="trItemRow" runat="server">
<td id="tdItemCell" runat="server" />
<tr id="itemContainer" class="item-style" runat="server" />

Changed to this in the RTM (yes, I took out an extra table, which was a lot easier to do with the new non-rendered containers):

<table id="groupContainer" class="sample-list">
<asp:PlaceHolder runat="server" id="groupPlaceholder" />
<asp:PlaceHolder id="itemPlaceholder" runat="server" />

It's very important to notice that, whereas the old syntax used rendered elements (tables, table rows) as containers, the new syntax uses non-rendered tags. This is important because any CSS formatting you've applied to your old container elements will no longer be rendered. The code will compile and the page will display, but the formatting will be lost. I think this is really an opportunity to clean up your CSS to use descendant selectors instead of styles applied to individual elements, e.g.:

table#groupContainer tr td a
color: #99c;

Daniel Moth has some info on this, Andreas Kraus explains the issue for both the Item Placeholder and the Group Placeholder.

8. Breaking changes in Linq To SQL

If you've got pre-release Linq To SQL code, you'll need to do the following:

  1. The Add and AddAll methods are now InsertOnSubmit and InsertAllOnSubmit. The Remove and RemoveAll are now DeleteOnSubmit and DeleteAllOnSubmit.
  2. Update the .dbml files encoding to utf-8 by changing
    <?xml version="1.0" encoding="utf-16"?>
    <?xml version="1.0" encoding="utf-8"?>
  3. Change the following line of web.config (note the difference in the version number):
    <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Data.DataSetExtensions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

Petar, one of my co-workers at Vertigo, wrote up a blog post on upgrading pre-release Linq To SQL code to RTM. It also includes some info on how to future-proof any pre-release code for a later upgrade to RTM.

9. Download the updated Microsoft Silverlight 1.1 Tools Alpha for Visual Studio 2008

The Silverlight 1.1 Tools Alpha wasn't ready when Visual Studio 2008 shipped, but it followed pretty closely. Grab it if you're working with Silverlight 1.1. As Scott Guthrie writes, it "includes basic Silverlight 1.1 project system support, XAML markup editing and intellisense support, debugging support, Expression Blend project compatibility, and VB and C# code-behind intellisense."

10. Upgrading your Solutions to the Visual Studio 2008 Format

Visual Studio 2008 uses a new format for solution and project files. Just opening them in Visual Studio 2008 will upgrade them, but if you have a lot of projects to upgrade to the new Visual Studio 2008 format, you can speed up the upgrade by running it from the command-line with the /Upgrade switch. One bonus is that this is scriptable, so you can automate upgrades of large numbers of solutions or projects.


That's my list. Did I miss any tips that have helped you? Remember that if you run into a strange install issue, you can probably find some help on the MSDN Forums under Visual Studio Setup and Installation.

1 If you do have something left after the initial uninstalls, you'll need to manually uninstall in the order listed:

  • Remove "MSDN Library for Visual Studio 2008 Beta"
  • Remove "Microsoft SQL Server Compact Edition 3.5"
  • Remove "Microsoft SQL Server Compact Edition 3.5 Design Tools"
  • Remove "Microsoft SQL Server Compact Edition 3.5 for Devices"
  • Remove "Microsoft Visual Studio Performance Collection Tools"
  • Remove "Windows Mobile 5.0 SDK R2 for Pocket PC"
  • Remove "Windows Mobile 5.0 SDK R2 for Smartphone"
  • Remove "Crystal Reports 2007"
  • Remove "Visual Studio Asset System"
  • Remove "Microsoft Visual Studio Web Authoring Component / Microsoft Web Designer Tools"
  • Remove "Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System Runtime"
  • Remove "Microsoft Visual Studio 2005 Tools for the 2007 Microsoft Office System Runtime Language Pack" (non-English editions only)
  • Remove "Microsoft Visual Studio Tools for Office Runtime 3.0"
  • Remove "Microsoft Document Explorer"
  • Remove "Microsoft Document Explorer 2005 Language Pack" (non-English editions only)
  • Remove "Microsoft Device Emulator 3.0"
  • Remove "Microsoft .NET Compact Framework 3.5"
  • Remove "Microsoft .NET Compact Framework 2.0 SP1"
  • Remove ".NET Framework 2.0 SDK"
  • Remove "Microsoft Visual Studio Codename Orcas Remote Debugger"
  • Remove "Microsoft Visual Studio 64bit Prerequisites Beta" (64-bit platforms only)
  • Remove "Microsoft .NET Framework 3.5"
  • If you've removed anything in this step, reboot again.

Thanksgiving as a lifestyle

CandlelightDisclaimers: I'm really getting out of character here, as I tend to keep focused on the code on my blog, but Rob's post inspired me... If code's what you're after, these aren't the droids you're looking for. You can move along. You're still here? Well, then, you should know that this is written as much for me as for anyone else. Hello, future Jon (apparently in need of a pep talk)!

So... Thanksgiving. It's easy to focus on the turkey, or the meal, or even the time with your family. All good things, but they don't get to the heart of thanksgiving.

Are you thankful that you're alive right now?

Regardless of spiritual views, I think all of us can approach life as an unearned opportunity of mind-boggling proportions. There's no logical reason that you should be there right now, reading these words. You have no innate right to exist.

And yet, you do. That spark that lives inside you... well, it ignited years ago, and trillions of cells work intently to keep it burning. Just the fact that a single one of those cells can sustain life is pretty wild, but the way they all work in concert to keep that spark from flickering out is just incredible. And yet, they do.

And so, here you are.

Now, slave as these cells do, they can't keep it up forever. If things go really well for you, you'll get one hundred years. At that, we should feel lucky - as recently as a hundred years ago, the average lifespan was under 40 years.1 So, cells and history have conspired to give your spark the opportunity to flicker (or shine) for as many as a hundred years2

And so, here you are.

And, the fact that you're sitting there reading a weblog post is pretty stunning. Yeah, all the technical stuff is neat, but the fact that you have the chance to sit an read anything at all is a major boon. I recently watched Letters from Iwo Jima, followed by the Band of Brothers series, and it really woke me up. Each second I get is somehow made more precious by watching and thinking about how better men died at random. I don't believe this is an artificial thought brought on by watching a few movies, rather I feel that I've been awakened to the fact that each second of my life may or may not be followed by another second of life, and it's largely out of my control. Forget about years, each second is a gift.

And so, here you are.

Sitting there as a limited stream of gift-wrapped seconds tumble into your lap. How does this perspective change things? For me, I've resolved (without waiting for a new year) to view each day as a gift, a chance, an opportunity. And, the more I think about it, I believe that the value I take from each day is directly related to the feeling of gratitude I feel as I start each day. As much as I can remember, I try to start each day with the thought that it's a gift - unexpected and undeserved. I'm not going to tell you my batting average on actually starting each day with those thoughts, but it is how I'm trying to live my life.

So, if you're lucky to be alive and you've only got a few dozen years to do what you're going to do... what will you do? What will you do differently?

You know those movies that end with someone waking up from a dream, with the chance to do it all over again the right way? What would you do if you were waking up from that dream today? Would you do anything differently?

1 While we are talking about history, consider that (1) given the fact that you're reading a weblog, you may be a geek (2) for most of history, geeks didn't have it so good. Five hundred or a thousand years ago, I'd have been happy to be a clerk or a librarian. You? Are you knight material?

2 If a hundred years seems like a lot to you, wait a few. It's not.

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

Rebooting the Monoppix project


Roiy and I have decided it's high time for another Monoppix release. Monoppix is a Linux Live CD pre-configured with Mono, MySQL, and a bunch of sample applications and training material. It's all designed to make it ridiculously simple to work (and play) with a configured Linux / Mono setup without having to spend hours or days getting it all set up.

After a short break (well, two short years), we're rebooting the project. There are some easy ways you can help us out, even if you have absolutely no experience with Mono or Linux.


Our first release was in 2004, and we've had tens of thousands (hard to track when the main distribution method is BitTorrent) of downloads. Our last release was in 2005, on Mono 1.1.8. Part of the reason we discontinued development, honestly, was the release of Mono Live, the official Mono Live CD. Their last release was in early 2006, though, and a lot's changed since then...

Mono's come a long way

Mono (the current release) supports most of .NET 2.0 (including almost all of WinForms 2.0), plus IronPython, the DLR, and a bunch of .NET 3.0 goodies. Mono 1.2.6 is due out on November 6th, adding:

    • Completed most of the 2.0 support, including:

      • Completed C# 2.0.
      • Completed ASP.NET 2.x (modulo WebParts).
      • Completed ADO.NET 2.x.
      • Most of Windows.Forms 2.0 (about 80% of it at this point).
    • Implemented most of C# 3.0 (few tidbits missing).
    • Implemented LINQ, and LINQ to XML (.NET 3.5).
    • Implemented some other bits from .NET 3.5
    • A Visual Basic.NET compiler, and its runtime.
    • Added a Silverlight toolchain (.NET 2.1).
    • Added COM/XPCOM support to Mono.

[via Miguel de Icaza - Mono Versioning]

Also, MonoDevelop has targeted a 1.0 release by the end of the year, and includes a lot of great IDE features (including database support, courtesy of the Google Summer of Code 2007).

Plus, there's the very exciting Mono / Moonlight plugin, which is the official support path for Silverlight on Linux. While I've read that the Mono dependency is being removed from the Moonlight plugin, I think it would be great to be able to easily test a Silverlight site on Linux. Lunar Eclipse (a XAML design tool, created for Moonlight content development) would be cool to add, if it's ready.

Add some cool new open source .NET applications to the mix

SubSonic has passed the Mono Migration Analyzer (MOMA) tests and just needs to be tested on Mono. That would be great, because SubSonic includes support for MySQL and SQLite, so it would really simplify writing cross database and platform applications if we could get that on there. There are some great applications which have been built on Mono (Banshee, Muine, F-Spot, Tomboy, Beagle, etc.), but there are also a lot of great .NET applications which, while written on Windows in Visual Studio, might make it over to Mono reasonably easily.

How you can help

  1. Feedback and input. What would you like to see included in a new release of Monoppix? If you've used Monoppix, what would you like to see changed?
  2. Sample applications, walk-through's, and training materials.
  3. Installing and testing .NET applications like SubSonic
  4. Website support for
  5. Remastering. This is the hard work, and we're not sure that we can have more than one person work on this at a time. Roiy's always handled that part. We may be able to take turns, though. If you've got experience setting up a Linux Live CD, we'd definitely like to hear from you. Our previous releases have run on Knoppix, but we're also looking at Ubuntu and OpenSUSE for this next release.
Posted by Jon Galloway | 1 comment(s)
Filed under:

I'll be at DevConnections & OpenForce November 5-8

I'm a panelist on a discussion on Open Source Architectural Models at DotNetNuke OpenForce. Hope to see you there!

Thursday, Nov 8 - 9:30 AM - 10:45 AM Lagoon F

DOS102: Panel Discussion: .NET Open Source Architectural Models
Joe Brinkman, Phil Haack, Jay Flowers, Jon Galloway and Rob Conery

Posted by Jon Galloway | 1 comment(s)
Filed under: ,
More Posts