phamtanlong / csharp-sqlite

Automatically exported from code.google.com/p/csharp-sqlite
Other
0 stars 0 forks source link

"Any CPU" build not running #122

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

1. Load unpack and build csharp-sqlite_3_7_7_1_64.zip
2. Set SQLiteClientTests as startup project and run it
3. Get exception

Could not load file or assembly 'Community.CsharpSqlite.SQLiteClient, 
Version=3.7.5.0, Culture=neutral, PublicKeyToken=null' or one of its 
dependencies. An attempt was made to load a program with an incorrect format.

Release works fine, but adding built assembly in my project causes same isse. I 
could not figure out what exactly happens. Tested on WinXP+VS2008 and 
Win7+VS2010.

Original issue reported on code.google.com by alexande...@gmail.com on 6 Jul 2011 at 2:31

GoogleCodeExporter commented 8 years ago
csharp-sqlite_3_7_5_30 results:

x86/Debug test ok

x86/Release test ok

Any CPU/Debug exception:
Unhandled Exception: System.BadImageFormatException: Could not load file or 
assembly 'Community.CsharpSqlite.SQLiteClient, Version=3.7.5.0, 
Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt 
was made to load a program with an incorrect format.
   at SQLiteClientTests.SQLiteClientTestDriver.Setup_T4()
   at SQLiteClientTests.SQLiteClientTestDriver.Test4() in C:\Work\cssqlite\csharp-sqlite\Community.CsharpSqlite.SQLiteClient\TestDriver_src\SQLiteClientTestDriver.cs:line 235
   at SQLiteClientTests.SQLiteClientTestDriver.Main(String[] args) in C:\Work\cssqlite\csharp-sqlite\Community.CsharpSqlite.SQLiteClient\TestDriver_src\SQLiteClientTestDriver.cs:line 516

Any CPU/Release runs  but sometimes reports about sql logic errors.

And still I can't use any of this builds in my application with "An attempt was 
made to load a program with an incorrect format" error.

Original comment by alexande...@gmail.com on 6 Jul 2011 at 2:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
You need to right click on the Community.CsharpSqlite and 
Community.CsharpSqlite.SQLiteClient projects and make sure you compile them for 
the AnyCPU build as well.

I added the appropriate compiler options to these project and confirmed the 
build works

This issue was closed by revision edbfa58ea0ef.

Original comment by noah.hart@gmail.com on 7 Jul 2011 at 5:43