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

6 posts, 0 answers
  1. Dusan
    Dusan avatar
    9 posts
    Member since:
    May 2013

    Posted 10 May 2013 Link to this post

    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

  2. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 15 May 2013 Link to this post

    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.
  3. DevCraft banner
  4. Dusan
    Dusan avatar
    9 posts
    Member since:
    May 2013

    Posted 15 May 2013 Link to this post

    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
  5. Dusan
    Dusan avatar
    9 posts
    Member since:
    May 2013

    Posted 15 May 2013 Link to this post

    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
  6. Boris Georgiev
    Admin
    Boris Georgiev avatar
    190 posts

    Posted 17 May 2013 Link to this post

    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.
  7. Dusan
    Dusan avatar
    9 posts
    Member since:
    May 2013

    Posted 19 May 2013 Link to this post

    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
Back to Top
DevCraft banner