{"id":5619,"date":"2014-04-04T05:08:10","date_gmt":"2014-04-04T05:08:10","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/compact-database-not-working-on-both-x86-and-x64-collection-of-common-programming-errors\/"},"modified":"2014-04-04T05:08:10","modified_gmt":"2014-04-04T05:08:10","slug":"compact-database-not-working-on-both-x86-and-x64-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/04\/compact-database-not-working-on-both-x86-and-x64-collection-of-common-programming-errors\/","title":{"rendered":"Compact Database not working on both x86 and x64-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn I am creating a WinForms application, and it works fine on x64 platforms. It has a compact database. However when I run it on x86, it fails to load with the following error: &#8220;sqlceme35.dll is either not designed to run on Windows or it contains an error&#8221;<\/p>\n<p>The sqlceme35.dll file is the brand new file from the service pack that is supposed to support both platform architectures\/os. Is there something I need to do so that it will work on x86?<\/p>\n<\/li>\n<li>\n<h3>6 Answers<\/h3>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn1<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn2<\/p>\n<p>I&#8217;m glad that Eric helped you solving this, but just FYI, compile to x86 doesn&#8217;t mean it doesn&#8217;t run on x64. I had to change this setting form &#8216;any cpu&#8217; to x86\u00a0on some of our projects so they run on x64, because of some dependencies they have.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn3 Eric, That article is awesome. Thanks a million for that. Since I am not doing a clickOnce install (which is what I think will provide the x86 version when needed), do I just handle the exception and load the x86 files in the case of non-x64? I may have my users install both runtime MSI files as you say, but was hoping to put all required files on a USB Drive and not have to load anything on the machine. It seems from the article that ClickOnce handles loading the proper files.<\/p>\n<p>Dave<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn4<\/p>\n<p>Thanks Alberto, but I need one build that runs on both.<\/p>\n<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn5<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.msdn.microsoft.com\/dn186180.LOGO_Win1211(id-id,MSDN.10).png\" \/><br \/>\nmsdn6<\/p>\n<p>I&#8217;m glad that Eric helped you solving this, but just FYI, compile to x86 doesn&#8217;t mean it doesn&#8217;t run on x64. I had to change this setting form &#8216;any cpu&#8217; to x86\u00a0on some of our projects so they run on x64, because of some dependencies they have.<\/p>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>msdn I am creating a WinForms application, and it works fine on x64 platforms. It has a compact database. However when I run it on x86, it fails to load with the following error: &#8220;sqlceme35.dll is either not designed to run on Windows or it contains an error&#8221; The sqlceme35.dll file is the brand new [&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-5619","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5619","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=5619"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5619\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}