Visual Studio and SQL Server - correct installation sequence?

62,632

Solution 1

It turns out I was missing 2 important pieces of information in my question that make this installation such a pain:

  • I was installing the 64 bit version of SQL Server
  • I was installing to a non-standard location (i.e. the D: drive, because C: is an SSD with not all that much space)

This was not successful. Here is what I ended up doing in my first (second, and third) attempt:

  • Install VS 2008 Professional on D:
  • Install VS 2008 SP 1
  • Install SQL Server 2008 Developer Edition (instance and shared components on D:)
  • Install SQL Server SP 1

Apparently VS 2008 Pro does not require a database. I am not sure why I remembered that it does. While the Visual Studio installation was eventless, I encountered the following errors during the SQL Server installation:

The INSTANCESHAREDWOWDIR command line value was not specified.

I was able to resolve that be starting setup from the command line (thanks to this MSDN forum post):

setup.exe /INSTALLSHAREDWOWDIR="D:\Program Files(x86)\Microsoft SQL 
Server" /INSTALLSHAREDDIR="D:\Program Files\Microsoft SQL Server"
/ACTION=install

Then towards the end of the installation, I got this error:

Upgrade Failed due to the following Error.The error code is :-2147467259.Message:Unspecified error

There is no solution, but a workaround, described in this post on connect.microsoft.com. It consists of copying a VS config file around before and after the installation, and re-running the installer just for BIDS (which is the one component that failed).

The SQL Server SP1 installation ran without issue. VS Studio, when trying to load a solution with an SSIS project, still threw the error that I posted in my original question.

I had ignored this error that popped up towards the end of the BIDS installation:

Microsoft Visual Studio Tools for Applications 2.0 Cannot find one or more components. Please reinstall the application.

However, there was no error in the install log and it completed "successfully", so I thought it would be ok to ignore the error.

It seems that my configuration is not possible (but I know with certainty that I had the 2005 versions of VS and SQL Server on a D: drive).

I uninstalled everything once again, manually deleted whatever folders were left, and reinstalled on the C: drive, including the SQL Server shared components. I put the instance folder on the D:.

  • Install VS 2008 Professional on C:
  • Install VS 2008 SP 1
  • Install SQL Server 2008 Developer Edition (instance on D:, shared components on C:)
  • Install SQL Server SP 1

This time everything installed and I can open my SSIS project.

Solution 2

You should install SQL 2008 Developer first, this will rule out the need for VS installing SQL which comes with it. Or you could do like others suggested and choose custom VS installation.

My favorite way is this:

  1. SQL 2008 Developer
  2. Visual Studio Professional 2008
  3. Run Windows Updates
  4. Install Resharper :-)
  5. Install RedGate SQL ToolBelt

But it seems that to get some features to work the proper order is:

  1. Visual Studio Professional 2008 (with SQL Unchecked)
  2. SQL 2008 Developer
  3. Run Windows Updates
  4. Install Resharper/Redgate Tools

Resharper and Redgate in my opinion are far the best tools for developing in C#/SQL.

Solution 3

If you are trying to install SQL-2008 and you also have visual studio 2008 installed with service pack one (SP1) and get the error

A previous release of Microsoft Visual Studio 2008 is installed on this computer. Upgrade Microsoft Visual Studio 2008 to the SP1 before installing SQL Server 2008”

Then welcome to the Microsoft beta testing program even if you purchased the faulty software.

With XP the most common solution seem to be renaming the registry key

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\VS\Servicing\9.0

and replacing 9.0 with 9.0Old. However this does not solve the problem if you are using windows 7 and the only solution I managed to find that worked was to uninstall VS2008 and all the components and to then install SQL-2008 and finally reinstall VS2008.

Solution 4

  1. Install Visual Studio Professional 2008.
  2. Install SQL 2008 Developer
  3. Apply SQL SP1
  4. Apply VS SP1

Then all should be good.

Share:
62,632
cdonner
Author by

cdonner

„Dem Herrn Ingeniör ist nichts zu schwör." At pod, We are aways looking for new and interesting projects.

Updated on July 09, 2022

Comments

  • cdonner
    cdonner almost 2 years

    I am rebuilding my development machine. This issue is not new to me, but I don't remember the solution. I started with SQL 2008 Developer, then VS 2008 Pro, then the SQL SP1, then VS SP1. The result is that I cannot open SSIS projects (see the error below). What is the correct order so that I can avoid the installation of SQL Server Express and still have all the features working?

    ---------------------------
    Microsoft Visual Studio
    ---------------------------
    Package Load Failure
    
    Package 'DataWarehouse VSIntegration layer' has failed to load properly ( GUID =
    {4A0C6509-BF90-43DA-ABEE-0ABA3A8527F1} ). Please contact package vendor for 
    assistance. Application restart is recommended, due to possible environment 
    corruption. Would you like to disable loading this package in the future? You 
    may use 'devenv /resetskippkgs' to re-enable package loading.
    ---------------------------
    Yes   No   
    ---------------------------
    
  • MadBoy
    MadBoy about 14 years
    If you do it this way SQL Express will get installed.
  • t0mm13b
    t0mm13b about 14 years
    @MadBoy: You can select custom installation and ensure that Sql Express edition does not get installed!
  • MadBoy
    MadBoy about 14 years
    I remember having some problem with that, but maybe my memory is playing tricks with me :) I prefer SQL Developer first anyway.
  • cdonner
    cdonner about 14 years
    BIDS installs the required package, so re-installing VS will not help. While it will make the error go away, I will not be able to create SSIS projects. For that, SQL needs to be installed after VS.
  • cdonner
    cdonner about 14 years
    The reason why I started with SQL was because I remember that VS requires a database, as it writes some stuff there, and I had problems before with removing SQL Express later, and VS complained about it. Possible that this was the database edition. Like I said, I don't remember. I will try VS first. I also remember that there were dependencies with the service packets. I think BIDS did not install after VS SP1 was applied. I will try tommieb's order.
  • cdonner
    cdonner about 14 years
    So your suggestion does not work either: --------------------------- Rule Check Result --------------------------- Rule "Previous releases of Microsoft Visual Studio 2008" failed. A previous release of Microsoft Visual Studio 2008 is installed on this computer. Upgrade Microsoft Visual Studio 2008 to the SP1 before installing SQL Server 2008. --------------------------- OK ---------------------------
  • cdonner
    cdonner about 14 years
    Your installation order btw will not work (unless you don't care about BIDS or SSIS). You need VS before you can install SQL Server, or the VS packages that SQL installs will be missing.
  • cdonner
    cdonner about 14 years
    But the story continues. Today, I tried to add a WM 5 project to the solution, and I have been trying for 3 hours already to get rid of this error: Package 'Microsoft.CompactFramework.Design.Data.CFDataPackage, Microsoft.CompactFramework.Design.Data, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has failed to load properly.
  • tomfanning
    tomfanning almost 10 years
    @cdonner For the benefit of readers four years on, VS does not require a database.