DLL hell with SQLite

前端 未结 3 755
栀梦
栀梦 2021-02-18 14:15

Some of our users are getting an issue with the version of sqlite.interop.dll that is being loaded at runtime, and it\'s a real head scratcher.

Background: A WPF applica

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-18 14:55

    We are dealing with this exact issue and the solution we found is to use the bundled package from the System.Data.SQlite website rather than the package from nuget: https://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki

    The bundled dll has both the managed and unmanaged assemblies merged so there is no need for dynamically loading the correct Sqlite.Interop.dll so you don't have the issue of conflicting versions in the appdomain.

    When using the bundled assembly you need to include your own logic in your application's installer to decide which dll to copy (x86 or x64).

    We haven't had any more issues with conflicting versions since using the bundled assembly.

提交回复
热议问题