Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, August 6, 2013 9:37 AM
Hi,
I have created an Assembly where i m using SQL lite data dll for database access.On some of the machine in my office that application is working fine .But in some machines its giving me error :
"The type initializer for 'DataServiceDll.ClsSqliteDataAcess' threw an exception."
Inner Exception:
System.IO.FileLoadException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'
at DataServiceDll.ClsSqliteDataAcess..cctor()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
helpLink:
exception:System.TypeInitializationException: The type initializer for 'DataServiceDll.ClsSqliteDataAcess' threw an exception. > System.IO.FileLoadException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at DataServiceDll.ClsSqliteDataAcess..cctor()
End of inner exception stack trace
at DataServiceDll.ClsSqliteDataAcess.ExecuteQry(String Query)
SaiVaibhav@Acumen
All replies (1)
Wednesday, August 7, 2013 7:44 AM âś…Answered
Hi,
System.Data.SQLite.dll has different version for X86 or X64 platform, the computers in your office must have different systems. The better way is to specify appropriate dll version to use on different systems.
So I suggest you follow the steps as below to resolve your issue:
1. Download proper versions of System.Data.SQLite.dll from SQLite Download Page. Please read the system requirements carefully before downloading.
2. Build the solution in different "Platform target"(Right click project>Properties>Build>Platform target). Deliver the application files on proper machines.
For more information, please refer to this thread:http://stackoverflow.com/questions/3388929/could-not-load-file-or-assembly-system-data-sqlite-version-1-0-65-0
I hope my reply be benefit for resolving your issue.
Caillen
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.