Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I finally decided to post a question here after some time spent trying to figure out this problem. A few days ago I posted this same question on sqlite forum but that website is currently not available . http://sqlite.phxsoftware.com/forums/t/2669.aspx

So, here is the question: I have 64-bit computer with 64-bit OS. A co-worker has 64-bit computer with 32-bit OS. We develop a web application that brings a lot of data from server and keeps it in memory SQLite database, so everything can run faster. Right now we use 32-bit SQLite.dll on both machines. However we want to switch to 64-bit dll (and increase amount of data we can use and store). I have downloaded from http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki folowing files: sqlite-dotnet-x64-1007300.exe and instaled on my machine. I have placed System.Data.Sqlite.dll and System.Data.Sqlite.Linq.dll into lib folder, while I have copied Sqlite.Interop.dll into binDebug folder. When I debug application by using Any CPU everything works fine on my machine, however, my co-worker is getting errors.

I want to use 64-bit dll and build exe file using Any CPU and not worry if the system is 32 or 64. Is that possible? And if it is what I should do to accomplish that? Thanks in advance!

P.S. We use C# - Visual Studio 2008 3.5 SP1

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
279 views
Welcome To Ask or Share your Answers For Others

1 Answer

Today, you don't have to any more. Just make sure you bundle both interop DLLs like this:

path_to_exeSystem.Data.SQLite.dll
path_to_exex64SQLite.Interop.dll
path_to_exex86SQLite.Interop.dll

and the System.Data.SQLite.dll will find the correct one depending on the platform.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...