简体   繁体   English

安装WPF应用程序时自动安装SQL Server Compact数据库.Exe文件

[英]Install SQL Server compact database .Exe file automatcally when I install WPF application

I had developed a WPF application, and its backend is a SQL Server CE .SDF file. 我开发了WPF应用程序,其后端是SQL Server CE .SDF文件。 In setup and deployment project I added .SDF file in it 在设置和部署项目中,我在其中添加了.SDF文件

The issue is: to access and get records from the .SDF file we require an additional software. 问题是:要访问.SDF文件并从中获取记录,我们需要其他软件。 Please find the below Link 请找到以下链接

https://www.microsoft.com/en-in/download/details.aspx?id=17876 https://www.microsoft.com/en-in/download/details.aspx?id=17876

It has 2 exe files 它有2个exe文件

  1. 64 Bit 64位
  2. 86/32 Bit 86/32位

Visual Studio directly installs this software when we install VS 当我们安装VS时,Visual Studio直接安装此软件。

On a client system, I didn't find these files so I am unable to access the .SDF file and get records from it 在客户端系统上,我找不到这些文件,因此无法访问.SDF文件并从中获取记录

I need to Copy these files in Application folder and Automatically Install it if the above software is not Present in the PC 如果PC中没有上述软件,我需要将这些文件复制到“应用程序”文件夹中并自动安装

Now I am Manually Installing these software(exe ) in Each PC 现在,我正在每台PC上手动安装这些软件(exe)

You're mistaken - to deploy a SQL Server CE 4.0 based application, you do NOT need to deploy and/or install any additional software to your client system - it suffices to include the necessary, relevant SQL Server CE 4.0 DLL's into your application (into the bin or lib folder or something), and just ship those files with your application. 你错了-部署一个SQL Server CE 4.0的应用程序,你不需要部署和/或安装任何额外的软件到您的客户端系统-它足以包含必要的,相关的SQL Server CE 4.0的DLL到应用程序中(放入binlib文件夹之类的文件),然后将这些文件与您的应用程序一起发货。 That's all you need - no server-side or client-side install needed ! 这就是你所需要 -安装不需要任何服务器端或客户端! (That's the WHOLE POINT of using SQL Server CE, after all!) (毕竟,这是使用SQL Server CE的全部要点 !)

See these links for in-depth descriptions of how to do it: 有关这些操作的详细说明,请参见以下链接:

Right here on Stackoverflow: 就在Stackoverflow上:

Another way to do it: 另一种方法是:

Official MSDN documentation: MSDN官方文档:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM