Todd Anglin's Code Campground

A casual look at the world .NET coding

Another Solution for Defeating the SQL Server 2008 Installer with Visual Studio 2008

Here’s the problem:

I have a clean Win7 RC box with VS 2008 SP1 installed and a working SQL 2008 Express “Data Base Engine” (installed via the Web Platform Installer). I discovered that SQL Management Studio Express was missing, and there began my long and frustrating journey to install Microsoft’s SQL management tools…

I’m not sure why the tools were missing in the first place, but it turns-out that there is no simple way to install them. There is no separate installer for the tools as there was (so conveniently) for SQL Server 2005. [UPDATE: After fighting a long battle, I rediscovered an option in the new Web Platform Installer to add the SQL Management Tools to SQL Server 2008. A little late now to know if that would have worked, but hopefully you can give that a try before getting too far on your own painful SQL Server 2008 journey.]

Enter the SQL Server 2008 installer. After countless attempts to “add” the tools to my existing install, I could never get the installer to provide me with the desired options. Not one to waste time “fighting software,” I uninstalled SQL Server 2008 and started fresh. To my dismay, the SQL Server 2008 Installer started throwing this install-blocking error at me when trying to re-install:

Setup will not complete because the rule "Previous releases of Microsoft Visual Studio 2008" failed.

This message further asserts that you must install Visual Studio 2008 SP1 before the installer will continue. But…like many others, I already installed SP1!

So, I began looking for hacks around the installer. There are many options scattered across the web, but the tip that finally made things clear is this:

The SQL Server 2008 installer is checking the HKLM\SOFTWARE\Microsoft\DevDiv\XXX\Servicing\9.0\SP reg keys to tell if SP1 is installed. If you inspect those keys and find any SP keys with the value “0,” that is your road block.

As it turns out, every installed version of Visual Studio 2008 must have SP1 installed for the SQL Server 2008 installer to work. This leads to the other main source of confusion:

If you installed SP1 for your “main” VS 2008 version (such as Pro or VSTS)- and you’re sure of it- there is probably some other version of VS installed that does not have SP1 installed (such as Express or- as in my case- Shell).

Inspecting your reg keys is the fastest way to discover if such a version is installed. In my case, I discovered that there was an entry for both “VSTS” and “IDE” in my Visual Studio reg keys. VSTS was my main Visual Studio version, and its SP reg key correctly indicated that SP1 was installed. For the IDE entry, though, the version was listed as RTM with no SP.

What is the “IDE” version of Visual Studio?

Thanks to the info on Heath Stewart’s blog, we learn that this reg key entry is for Visual Studio Shell edition. It’s not clear when this version of VS2008 is being installed (or how important it is for other programs), but uninstalling it or upgrading it to SP1 is yet another way to solve your SQL Server 2008 install problems.

One more handy tip.

If you really want to take a blunt-force approach to any of the SQL Server 2008 “warnings,” there are command line switches that enable you to bypass some of the rule checks. Originally revealed by “Paul” in the comments of another blog post, you can use the following switch to launch your SQL Server 2008 installer with the VS version check and “reboot required” rules disabled:

setup /ACTION=install /SkipRules=VSShellInstalledRule RebootRequiredCheck

Based the sheer volume of comments and blog posts already on the Interwebs about this very topic, it would seem that Microsoft may have regressed a bit with the release of SQL Server 2008. I’m sure there are plenty of “good reasons” for why SQL Server 2008 “has” to be so dependent on VS 2008, but the end result is clearly lots of frustration for users. I hope MSFT takes note and makes things simpler for the next version. I know many hours of frustration will be saved if they do!

Comments

Paige Cook said:

Todd,

I also just loaded up the Windows 7 RC this week. I installed VS 2008 (excluded the SQL Express 2005 installs) and then immediately applied VS 2008 SP1.

Then I went out to install SQl Express 2008 and on the download page it suggested that I use the Web Platform installer to install SQL Express 2008. So I took that route and was able to install both SQL Express 2008 SP1 and the Sql Server Management Express 2008 tools.

This worked like a charm, I had no issues and was even able to setup all of my web platform options &  settings. (IIS, ASP.NET, etc.)

Overall the Web Platform installer is pretty slick and makes the configuration very easy. I would highly recommend it.

Sorry that you had to go through all of the pain that you did.

# July 10, 2009 8:21 AM

tanglin05 said:

@Paige - Thanks for the extra info! I'm glad your experience went well. I've had similar good experiences with SQL Server 2008 and VS 2008, but for whatever reason, this one went south. I think the key source of trouble is the SQL Tools. If you miss the fact that you can install them from the new WPI, you're headed for my painful journey.

So, key lesson: Try installing the SQL Server 2008 tools from the WPI before taking any other "creative" steps to get them installed!

# July 10, 2009 9:17 AM

Kevin P. Rice said:

Web PI failed for me despite that VS 2008 SP1 is already installed:

Error: "Product 'SQL Server 2008 Express with Advanced Services' is incompatible with product 'Microsoft Visual Studio 2008 RTM. Please install Visual Studio 2008 SP1'.

Next step, I ran the VS 2008 SP1 installer (www.microsoft.com/.../details.aspx). It reported a whole slew of products that would be affected by the SP1 install (perhaps one of these is blocking the SQL 2008 install?):

* Visual C++ 2008 SP1 - x86 Runtime

* Visual C++ 2008 SP1 - x64 Runtime

* Visual C++ 2008 SP1 - IA64 Runtime

* Microsoft Office Standard 2007

* Microsoft Office Visual Web Developer 2007

* Microsoft Visual Studio 2008 Professional Edition - ENU

* Microsoft Visual Studio 2008 Remote Debugger - ENU

* Visual Studio .NET Prerequisites - English

* Visual Studio Tools for the Office system 3.0 Runtime

* Microsoft Windows SDK for Visual Studio 2008 Tools

* Microsoft Windows SDK for Visual Studio 2008 Win32 Tools

* Microsoft Windows SDK for Visual Studio 2008 .NET Framework Tools

* SQL Server System CLR Types

* Microsoft SQL Server Management Objects

* SQL Publishing Wizard 1.3

* Microsoft SQL Server Compact 3.5 SP1 (ENU)

* Microsoft SQL Server Compact 3.5 SP1 Design Tools (ENU)

Now, I already had run the SP1 installer in the past, but maybe some of these other installations were newer and still required the VS 2008 SP1? Couldn't hurt to run the SP1 installer again...

About an hour later (after the very long download install process) the SP1 installer reported success... now back to SQL Server 2008 (that was the goal that I just about forgot at this point).

I reopened Win PI from the Microsoft SQL Server Express download page (selecting the "Runtime with Advanced Services" edition, in my case).

SUCCESS!! Win PI now opens the SQL Server 2008 install with no complaint.

My lesson: Try running the VS 2008 SP1 install again.

# August 12, 2009 6:19 AM

El Blog de Fede said:

  Estimados, como estamos. Bien, les cuento lo que nos pasó… Habíamos instalado todo nuevo una PC

# September 15, 2009 5:42 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)