无法将必备组件放在与我的应用程序相同的位置 [英] cannot put prerquisite components in the same location as my application

查看:119
本文介绍了无法将必备组件放在与我的应用程序相同的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VS 2013,并且我希望sql server 2012在创建安装程序时将localdb与我的应用程序放置在同一位置.因此,在项目属性>发布>先决条件中,我选择第二个选项(从与我的应用程序相同的位置下载先决条件).
但是当我构建解决方案时,它显示以下错误:
若要在先决条件"对话框中启用从与我的应用程序相同的位置下载先决条件",必须将项目"SQL Server 2012 Express LocalDB"的文件"SqlLocalDB2012 \ x64 \ sqlncli.msi"下载到本地计算机.有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkId=239883 .
我该如何解决? 谢谢!

I work with VS 2013 and i want sql server 2012 express localdb to be in the same location as my application is when i create setup. so in project properties> Publish>Prerequisites I choose the second option (Download prerequisites from the same location as my application).
But When i build the solution it shows the following error:
To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'SqlLocalDB2012\x64\sqlncli.msi' for item 'SQL Server 2012 Express LocalDB' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=239883.
how can i solve this? thank you!

推荐答案

我最近在将.NET Framework 4.0包含在我的应用程序中时遇到了类似的问题.一旦弄清楚它到底在哪里寻找丢失的文件,我就能够解决该问题.

I recently ran into a similar issue with including .NET framework 4.0 in my application. I was eventually able to resolve the issue once I figured out where exactly it was looking for the missing files.

我假设您已经安装了某些版本的SQL Server(Express或其他版本).

I am assuming that you have installed some version of SQL Server (Express or otherwise).

如果您拥有Visual Studio 2013,则应具有以下文件夹:

If you have Visual Studio 2013 you should have the following folder:

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\

在该文件夹中,您应该有一个"SqlLocalDB2012"文件夹.

Within that folder you should have a "SqlLocalDB2012" folder.

在该文件夹中应该有一个product.xml文件.这也是安装程序所在的位置.在我的情况下,它们不存在,因此我必须将它们收集起来,然后将它们放在带有product.xml文件的文件夹中(对于默认的英语安装程序)或在子文件夹中(例如对于fr的法语). (请注意,在我的情况下,我缺少.NET FrameWork安装程序,而不是SqlLocalDB2012,但我假设问题与我遇到的问题相同.)

Within that folder there should be a product.xml file. This is also where the installers should reside. In my case they were absent and I had to collect them and place them in the folder with the product.xml file (for the default english installers) or in a subfolder (e.g. fr for french). (Note that in my case I was missing .NET FrameWork installers and not SqlLocalDB2012, but I am assuming the issue to be the same that I encountered).

产品xml文件可以为您提供线索,在哪里可以找到计算机上丢失的文件.就我而言,前几个元素表明它正在SQL Server目录中寻找内容:

The product xml file can give you a clue where to find the missing files on your computer. In my case the first couple of elements revealed it was looking for stuff in the SQL Server directory:

<FileCheck
      Property="sqllocaldbVersion"
      FileName="sqlservr.exe"
      SearchPath="Program Files\Microsoft SQL Server\110\LocalDB\Binn"
      SpecialFolder="WindowsVolume"
    />

通过在以下子目录中搜索它们,我能够在各个子目录中找到丢失的文件:

I was able to find the missing files in various subdirectories by searching for them in:

C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap

希望能为您做到这一点.

Hopefully that will do it for you.

这篇关于无法将必备组件放在与我的应用程序相同的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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