Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop SQL Server 2008 R2 trying to install some package when I build my setup project?

I have a WPF Linq-to-SQL project which I have been developing using MS Visual Studio 2008. I was running SQL Server 2008, and recently upgraded it to version R2. Now, whenever I build my SETUP project (not the app itself), the build process causes a window to launch:

SQL Server 2008 R2 Management Studio Please wait while Windows configures SQL Server 2008 R2 Management Studio

Which after a progress bar and some delay, complains: "The feature you are trying to use is on a network resource that is unavaiable." With an option to point to a source, and it is apparently trying to use c:\687b0370badbfcf47c\x86\setup\ , which doesn't exist.

If I click Cancel at that point, it says, "An installation package for the product SQL Server 2008 R2 Management Studio cannot be found. Try the installation again using a valid copy of the installation package 'sql_ssms.msi'."

I then get to watch the progress bar go backwards, and then it starts all over again. At this point, the setup build is waiting trying to build the MSI for my project. One time this resulted in Visual Studio crashing. Other times, I have been able to tell the progress bar window to cancel, and then my setup project builds fine.

So my questions are:

  • How do I get this to stop launching unwanted installer attempts when I try to build my setup?

and

  • Why is it doing this in the first place?
like image 988
Dronz Avatar asked Oct 28 '10 08:10

Dronz


People also ask

What is silent installation in SQL Server?

A silent installation runs on its own without any user interaction, and is considered unattended. Administrators can install Data Protection for SQL Server by using silent installation.

What command can be used to change a generic parameters during installation?

Setting generics/parameters in Synopsys Synplify Synopsys Synplify can set generics from a Tcl command or from the GUI.

Does SQL Server need .NET framework?

Summary. Different versions of Microsoft SQL Server have different . NET Framework versions as a prerequisite for setup, and the procedure to install the . NET Framework may be different on different operating systems.

What is SQL Server installation folder?

If you set an installation path for the Database Engine feature, SQL Server Setup uses that path as the root directory for all instance-specific folders for that installation, including SQL Data Files. In this case, if you set the root to "C:\Program Files\Microsoft SQL Server\MSSQL{nn}.


2 Answers

When you build a Microsoft Visual Studio 2010 setup project a Microsoft SQL Server 2008 R2 setup might start. To solve this problem on a x64 system:

regsvr32.exe /u "C:\Program Files (x86)\Common Files\microsoft shared\MSI Tools\mergemod.dll"
regsvr32.exe "C:\Program Files (x86)\Common Files\microsoft shared\MSI Tools\mergemod.dll"

on a x86 system

regsvr32.exe /u "C:\Program Files\Common Files\microsoft shared\MSI Tools\mergemod.dll"
regsvr32.exe "C:\Program Files\Common Files\microsoft shared\MSI Tools\mergemod.dll"
like image 90
Zubair Avatar answered Oct 12 '22 11:10

Zubair


The folder c:\687b0370badbfcf47c is what was created by the SQL install when you ran it - it creates a randomly named folder and then expands all its setup files into that folder. Whichever feature you are missing was merely installed as "advertised" instead of being installed fully, this means it doesn't get installed until you actually try to use the feature, which is what the publish functionality of VS is doing.

I can't guess exactly what is missing, but this is how to fix it.

  • uninstall your current instance of SQL (which will take 10 to 15 mins depending on the speed of your machine), then reinstall. Make sure you take the install option that allows you to choose which feature to install, then make sure you have selected the database engine, client connectivity tools, management tools (if available), and also Management Studio (if available - you might as well, managing the database without it is a PITA).

  • or you can start to install another instance from the same SQL installer package. Once you get to the initial setup screen, bring up file explorer and find the temp folder it has made and its expanded install files. Recreate the folder c:\687b0370badbfcf47c, and copy the expanded install files over to it. Then cancel the install you had in progress. Now build your setup again, the SQL install will kick in, but now it should complete and let you continue.

like image 20
slugster Avatar answered Oct 12 '22 10:10

slugster