问题
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!
回答1:
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.
I am assuming that you have installed some version of SQL Server (Express or otherwise).
If you have Visual Studio 2013 you should have the following folder:
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\
Within that folder you should have a "SqlLocalDB2012" folder.
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).
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.
回答2:
Just go to this link and download the files needed as instructed the tricky point is you must download x86 and x64 files and put them in x86 and x64 folders in root folder
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper\Packages\SqlLocalDB2012
来源:https://stackoverflow.com/questions/25673797/cannot-put-prerquisite-components-in-the-same-location-as-my-application