Unable to load DLL 'sqlite3': The specified module could not be found

后端 未结 4 480
夕颜
夕颜 2021-01-06 14:41

I\'m having a heck of a time getting my tests to run against my SQLite Data Provider.

I\'ve looked at the suggested links here on stackoverflow, but none of them see

4条回答
  •  有刺的猬
    2021-01-06 15:08

    So the answer for me was quite simple. I wired up a Pre-Build event that checks the architecture of the machine, and copies the appropriate dll into the output bin directory.

    Now anyone on our team can simply run REBUILD, and the proper dll will be available to run against SQLite.

    if '$(PROCESSOR_ARCHITECTURE)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\") 
    if '$(PROCESSOR_ARCHITECTURE)'=='x86' (xcopy /y "$(ProjectDir)x86\sqlite3.dll" ".\")
    if '$(PROCESSOR_ARCHITEW6432)'=='AMD64' (xcopy /y "$(ProjectDir)x64\sqlite3.dll" ".\")
    

提交回复
热议问题