In a VS2013 .Net4.5.1 x86
solution I have unit tests that instantiate a SQLite
connection. Previously (in VS2008) this was accomplished simply by a reference to the System.Data.SQLite dll (1.0.60.0)
. However this doesn't work in the .Net4.5.1
world.
So, in VS2013
I have used Nuget
to install the latest SQLite
package into the test project. Now, I can see the packages folder has been installed into the solution root folder, and the test project has a new reference to
System.Data.SQLite ((...\packages\System.Data.SQLite.Core.1.0.98.1\lib\System.SQLite\dll))
However, when I run the tests they fail with the message
"Unable to load SQLite.Interop.dll. The speficied module cannot be found".
I can see that SQLite.Interop.dll
isn't present in the test execution folder (TestResults...\Out) which explains the error message, so I've tried adding that file from the ...\packages\System.Data.SQLite.Core.1.0.98.1\build\net451\x86
folder to the test project and making it 'Copy Always', but that doesn't work. it is still missing from the test execution folder.
I also note that installing SQLite
into the GAC (which in principle at least might cure the problem) isn't recommended.
Can anyone advise what needs to be done?
TIA