Customizing Visual Studio 2008 Prerequisites to allow for Visual C++ 2005 Runtime


Ran into a problem a while back after upgrading to Visual Studio 2008 and thought I would share it.

When upgrading a group of projects that included an installer project which in turn includes the Visual C++ Runtime (2005) as a prerequisite, to Visual Studio 2008, it is not immediately obvious that the Visual C++ Runtime included in the prerequisites for Visual Studio 2008, is the 2008 version only.

The application I am currently working on uses a third party component whose prerequisite include the Visual C++ 2005 Runtime, so it is not under my control which version it needs. Components developed for C++ 2005 will not register with the C++ 2008 Runtime installed.

In order to include the 2005 runtime in the prerequisites list within you must add them in as custom prerequisites for Visual Studio 2008 installers.

This requires getting a copy of the Visual C++ 2005 Runtime installers and placing them in the Visual Studio 2008 folder (or vice versa). You will need to rename the folders as the folders and file names for 2005 and 2008 C++ Runtimes are the same. Once in the folder they will also need modified so that you can tell which are which (2005 or 2008), you do this by modifying the "package.xml" file held in the "en" folder of each package.

Once modified Visual Studio will pick up the new list and allow you to select the correct version.

Visual Studio 2008’s packages folder has changed and is now in the SDKs folder, on 32bit OS systems this will be "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages" and on 64bit OS systems it is "C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages" (default paths).

For Visual Studio 2005 the packages folder is in a sub folder of the install path, on 32bit OS systems this is "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages" and on 64bit systems it is "C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages" (default paths).

In case you do not have access to the packages for the previous versions, I have uploaded them to my SkyDrive, click here to download.

Paul B
MCP