当我构建我的安装项目时,如何阻止 SQL Server 2008 R2 尝试安装某些包? [英] How do I stop SQL Server 2008 R2 trying to install some package when I build my setup project?

查看:12
本文介绍了当我构建我的安装项目时,如何阻止 SQL Server 2008 R2 尝试安装某些包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 WPF Linq-to-SQL 项目,我一直在使用 MS Visual Studio 2008 进行开发.我运行的是 SQL Server 2008,最近将其升级到版本 R2.现在,每当我构建我的 SETUP 项目(而不是应用程序本身)时,构建过程都会启动一个窗口:

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 管理工作室Windows 正在配置 SQL Server 2008 R2 Management Studio,请稍候

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

在进度条和一些延迟之后,抱怨:您尝试使用的功能位于不可用的网络资源上."带有指向源的选项,它显然正在尝试使用不存在的 c:687b0370badbfcf47cx86setup.

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:687b0370badbfcf47cx86setup , which doesn't exist.

如果此时我单击取消,它会显示找不到产品 SQL Server 2008 R2 Management Studio 的安装包.请使用安装包 'sql_ssms.msi' 的有效副本再次尝试安装."

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'."

然后我会看到进度条倒退,然后重新开始.此时,安装构建正在等待尝试为我的项目构建 MSI.有一次,这导致 Visual Studio 崩溃.其他时候,我可以告诉进度条窗口取消,然后我的设置项目就可以正常构建了.

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.

所以我的问题是:

  • 如何在我尝试构建我的设置时停止启动不需要的安装程序尝试?

  • 为什么要这样做?

推荐答案

文件夹 c:687b0370badbfcf47c 是您运行 SQL 安装时创建的文件夹 - 它创建一个随机命名的文件夹,然后将其所有设置文件展开到该文件夹​​中.无论您缺少哪个功能,都只是作为广告"安装而不是完全安装,这意味着在您实际尝试使用该功能之前不会安装它,这就是 VS 的发布功能正在做的事情.

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.

  • 卸载您当前的 SQL 实例(这将需要 10 到 15 分钟,具体取决于您的计算机速度),然后重新安装.确保您选择了允许您选择要安装的功能的安装选项,然后确保您选择了数据库引擎、客户端连接工具、管理工具(如果可用)以及 Management Studio(如果可用 - 您也可以,没有它来管理数据库是一个 PITA).

  • 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).

或者您可以从同一个 SQL 安装程序包开始安装另一个实例.进入初始设置屏幕后,打开文件资源管理器并找到它创建的临时文件夹及其扩展的安装文件.重新创建文件夹 c:687b0370badbfcf47c,并将展开的安装文件复制到其中.然后取消正在进行的安装.现在再次构建您的设置,SQL 安装将启动,但现在它应该完成并让您继续.

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.

这篇关于当我构建我的安装项目时,如何阻止 SQL Server 2008 R2 尝试安装某些包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆