简体   繁体   中英

Deploy application without install SQL Server CE error

I'm trying to deploy a desktop application (wpf) that uses an external .dll that defines the logical model. In this external library the model is defined using EntityFramework. In the wpf application I use SQL Server CE as database using this app.config info:

<connectionStrings>
   <add name="SomeManager" 
        connectionString="Data Source=Database/SomeDatabase-20130220200325.sdf" 
        providerName="System.Data.SqlServerCE.4.0"/>
</connectionStrings>

I want that the final client doesn't need to install SQL Server CE in his machine, so I want include the libraries CE libraries into my finall folder. I know it is possible due in the MSDN they give a solution for it. Copying the seven files of SQL Server CE 4 on the finall folder, and also the System.Data.SqlServerCE.dll file. I do this, but for some reason the application still is trying to get the libraries from the system, and not from the local application folder, so when I run the app in a machine without the SQL Server CE 4 installed, it doesn't runs.

What could fix this problem, I will appreciate any ideas. Thanks...

您可以将SQL Server Compact二进制文件包含在您的应用程序中,只需xcopy部署它们,详细信息请参见我的博客: http ://erikej.blogspot.dk/2011/02/using-sql-server-compact-40- with.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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