This is a migrated thread and some comments may be shown as answers.

Error: SQLite - located assembly's manifest definition does not match the assembly reference

5 Answers 344 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dusan
Top achievements
Rank 1
Dusan asked on 10 May 2013, 08:09 AM
Hi,
I am using deployment scenario when all assemblies are simply copied into the application's bin folder. While on my development box the software project runs just fine, it throws an error when ran on client's PC.
Would OA runtime require System.Data.SQLite.dll to be installed into GAC? The originator's website does not recommend such approach (System.Data.SQLite FAQ).

Here's the full exception text including a stack trace:

System.Configuration.ConfigurationErrorsException: Database provider System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139 not installed properly (CLR=v2.0.50727 32bit). ---> System.IO.FileLoadException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.81.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.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'
   at System.RuntimeTypeHandle._GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, Boolean loadTypeFromPartialName)
   at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.RuntimeType.PrivateGetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
   at System.Type.GetType(String typeName, Boolean throwOnError)
   at OpenAccessRuntime.ProviderFactoryLoader.LoadImpl(String name, LogEventStore log, Int32 id)

Thank you for looking into it.

Regards,
Dusan

5 Answers, 1 is accepted

Sort by
0
Boris Georgiev
Telerik team
answered on 15 May 2013, 08:19 AM
Hello Dusan, 

If you want to use OpenAccess ORM on a client's PC without installing it, in addition to the copied OpenAccess libraries you should also integrate the OpenAccess Enhancer tool in the solution. OpenAccess Enhancer reads and processes compiled .NET assemblies for adding persistence capability and the enhancement must be executed on all assemblies containing persistence classes as part of the build process. Also you can take a look at this article that describes How to: Use OpenAccess ORM Without installing it.

In addition of this steps, you should be careful that you are copying the correct libraries i.e. if your project is compiled for x64 platform you should copy the System.Data.SQLite x64 assembly.

I hope that helps. If you still experience the same problem, or you need any further assistance, do not hesitate to get back to us.

All the best,
Boris Georgiev
the Telerik team
OpenAccess Samples Kit boasts 50+ sample applications providing diverse real-life business solutions. Click to read more and see OpenAccess ORM in action.
0
Dusan
Top achievements
Rank 1
answered on 15 May 2013, 10:02 AM
Hello Boris,

Thank you for taking a time to answer my question. HOWEVER I would like to point you in the direction of comment made in the documentation link you referenced...

"If you have added Telerik OpenAccess Domain Model via the "Add New Item" command to your project, the enhancement is already added to the MsBuild project file and no changes are necessary. However, this scenario only works if you have Telerik OpenAccess ORM installed on your build machines."

Please note that I have added domain model via Add New Item method and also my build machine is my development box. At least for now.

Regards,
Dusan
0
Dusan
Top achievements
Rank 1
answered on 15 May 2013, 10:21 AM
Further I would like to stipulate that the exception was caused by OpenAccess ORM expecting newer version of System.Data.SQLite.dll. Once I have updated all project references to point to the same DLL it was all fine.
Also please read my previous reply to your answer. Thank you!
Regards,
Dusan
0
Boris Georgiev
Telerik team
answered on 17 May 2013, 03:11 PM
Hello Dusan,

I am sorry for the inconsistent answer in my previous post and 
am glad to see you have managed to resolve the issues on your side.

If you have any other questions, do not hesitate to contact us again.

Regards,
Boris Georgiev
the Telerik team
OpenAccess Samples Kit boasts 50+ sample applications providing diverse real-life business solutions. Click to read more and see OpenAccess ORM in action.
0
Dusan
Top achievements
Rank 1
answered on 19 May 2013, 02:48 PM
Hi Boris,

Thank you very much. Your answer was well meant and if I was clearer explaining myself I am sure you would have found the appropriate answer.

All the best.

Regards,
Dusan
Tags
Data Access Free Edition
Asked by
Dusan
Top achievements
Rank 1
Answers by
Boris Georgiev
Telerik team
Dusan
Top achievements
Rank 1
Share this question
or