0

I built the app using SQL Server CE 4.0 and it runs just fine in Windows 7.0 dev machine, but got the following error message running it in Windows 8 (x64 version, Lenovo All-In-One Horizon 27' HW platform):

Is not a valid Win 32 application (Exception from HRESULT: 0x800700C1)

In app directory I can clearly see the

System.Data.SqlServerCe.dll

and all other 7 DLLs:

Sqlceca40.dll    Sqlcecompact40.dll     Sqlceer40EN.dll  
Sqlceme40.dll    Sqlceoledb40.dll       Sqlceqp40.dll      Sqlcese40.dll

taken from C:\Program Files\Microsoft SQL Server Compact Edition\v4.0 root directory and included in the app dir as per recommendation at: http://msdn.microsoft.com/en-us/library/vstudio/aa983326%28v=vs.110%29.aspx .

Other settings:

  • Configuration Platform: Any CPU Target Platform: x86 Setup
  • TargetPlatform: x64

Any idea on what went wrong and how to fix it? Thx.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Alexander Bell
  • 7,842
  • 3
  • 26
  • 42
  • Is the Platform target of your app set to x86, and have you included the x86 dll files? – ErikEJ Oct 06 '13 at 08:24
  • As FYI: Issue has been resolved when I changed project Target Platform to: Any CPU, then recompiled and re-installed the app. – Alexander Bell Oct 06 '13 at 15:10
  • @ErikEJ: No, I didn't, though I have noticed a set of same .dll sitting in the sub-directory ./Private/x86. Shall we include that stuff in case of Target Platform set to Any CPU or only in case of x86? And, if yes, should we create additional sub-dir for 'em in app directory? Many thanks. – Alexander Bell Oct 06 '13 at 17:26
  • Watch my blog post coming tomorrow for a simpler approach... – ErikEJ Oct 06 '13 at 18:03

0 Answers0