{"id":5635,"date":"2014-04-04T05:18:07","date_gmt":"2014-04-04T05:18:07","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/sql-server-compact-3-5-sp2-private-deployment-in-separate-folder-in-project-tree-fails-collection-of-common-programming-errors\/"},"modified":"2014-04-04T05:18:07","modified_gmt":"2014-04-04T05:18:07","slug":"sql-server-compact-3-5-sp2-private-deployment-in-separate-folder-in-project-tree-fails-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/sql-server-compact-3-5-sp2-private-deployment-in-separate-folder-in-project-tree-fails-collection-of-common-programming-errors\/","title":{"rendered":"SQL Server Compact 3.5 SP2 Private Deployment in separate folder in project tree fails-Collection of common programming errors"},"content":{"rendered":"<p>I have a desktop .NET 4.0 C# \u00a0application and I&#8217;m trying to do a private deployement of SQL Server Compact 3.5 SP2. I have followed the steps described in\u00a0here, here\u00a0and here\u00a0and it worked fine. In an attempt to improve the configuration, I followed the instructions described in this post\u00a0to isolate the SQL CE files in a separated folder. However, after doing that, the application no longer works. When I try to run it, I get the following error message:<\/p>\n<p>Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 8080. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details. StackTrace: \u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() \u00a0 \u00a0at System.Data.SqlServerCe.SqlCeConnection..ctor() \u00a0 \u00a0at System.Data.SqlServerCe.SqlCeProviderFactory.CreateConnection() \u00a0 \u00a0at System.Data.EntityClient.EntityConnection.GetStoreConnection(DbProviderFactory factory) \u00a0 \u00a0at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) \u00a0 \u00a0at System.Data.EntityClient.EntityConnection..ctor(String connectionString) \u00a0 \u00a0at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) \u00a0 \u00a0at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) \u00a0&#8230; InnerException:<\/p>\n<p>System.DllNotFoundException: Unable to load DLL &#8216;sqlceme35.dll&#8217;: The specified module could not be found. (Exception from HRESULT: 0x8007007E)<\/p>\n<p>\u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.GetSqlCeVersionInfo(IntPtr&amp; pwszVersion) \u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath, Int32 moduleVersion) \u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()<\/p>\n<p>StackTrace: \u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.GetSqlCeVersionInfo(IntPtr&amp; pwszVersion)<\/p>\n<p>\u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath, Int32 moduleVersion) \u00a0 \u00a0at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries()<\/p>\n<p>InnerException: null<\/p>\n<p>Here is how the files are structured in the project:<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/social.msdn.microsoft.com\/Forums\/getfile\/241501\" \/><\/p>\n<p>The relevant entries in the &#8220;App.config&#8221; file:<\/p>\n<pre>\n                \n                        \n                        \n                                \n                                \n                        \n                \n        \n        \n                \n                        \n                        \n                \n        <\/pre>\n<p>I have checked the bin output and the files are corrected copied to it, mirroring the project tree.<\/p>\n<p>Has any one got a clue on what is the problem here?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a desktop .NET 4.0 C# \u00a0application and I&#8217;m trying to do a private deployement of SQL Server Compact 3.5 SP2. I have followed the steps described in\u00a0here, here\u00a0and here\u00a0and it worked fine. In an attempt to improve the configuration, I followed the instructions described in this post\u00a0to isolate the SQL CE files in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5635","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5635"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5635\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}