Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Error: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies.
Roger Martin
#1 Posted : Sunday, 5 October 2008 5:32:09 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Scenario A
When you run the web-based installer for the first time, you might get the following error:

Quote:
Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format.


This is probably because you are installing the 32-bit version of GSP on a 64-bit operating system or the other way around. To resolve this, download the appropriate version from the download page.

Note that the only difference between the 32-bit and 64-bit versions of GSP is the version of System.Data.SQLite.dll that is included.

Scenario B
If you get this error when running the source code version, the most likely cause is that Visual Studio is trying to load the 64-bit version of System.Data.SQLite.dll into a 32-bit process. If this happens, rename the 64-bit version of System.Data.SQLite.DLL (you'll find it at TIS.GSP.Data.SQLite\assemblies\x64). For example, rename it to System.Data.SQLite_x64.DLL. That will trigger Visual Studio to automatically load the 32-bit version in the x86 directory instead.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
mdake411
#2 Posted : Sunday, 14 February 2010 10:51:00 PM(UTC)
Rank: Newbie

Joined: 14/02/2010(UTC)
Posts: 1
Location: Cincinnati

I am running the 64-bit version of Windows 7 Ultimate, and I am using SQL Server 2008. I am having difficulty running the source code in Visual Studio 2008 Pro. I have set the SQL Server options in both config files.

I also tried the 64-bit web-based installer, and I was not able to get the gallery to work (scenario A) until I removed the two DLLs related to SQLite. However, with scenario B, the resolution has not been as easy. I tried removing the project related to SQLite, but am still getting the assembly error for this topic.

Any suggestions?
Roger Martin
#3 Posted : Wednesday, 17 February 2010 3:33:57 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

If you aren't using SQLite I would do the following:

1. Remove the SQLite project from your solution.

2. Replace the web.config file in the root of the Website project with one of the SQL Server versions of web.config. For example, if you are running the app under .NET 4.0, rename web_sqlserver_4.0.config to web.config. (The SQL Server versions of web.config have all references to SQLite removed.)

3. Open gs\galleryserverpro.config and remove the reference to the SQLite data provider. When you are done, the <dataProvider> section will look like this:

Code:
<dataProvider defaultProvider="SqlServerGalleryServerProProvider">
<providers>
<clear />
<add applicationName="Gallery Server Pro"
connectionStringName="SqlServerDbConnection"
name="SqlServerGalleryServerProProvider"
type="GalleryServerPro.Data.SqlServer.SqlDataProvider" />
</providers>
</dataProvider>


These steps will purge all SQLite references so you shouldn't get the error any more. You may have to manually delete all the files from the bin directory and rebuild.

Note that the only difference between the 64-bit and 32-bit downloads is whether it includes the 64-bit or 32-bit version of System.Data.SQLite.dll, so if you are using SQL Server and deleted the SQLite DLLs it doesn't matter which download you use.

Hope this helps,
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.