I again encountered a similar error message. If I remember correctly, the essence of the problem was as follows: (this may not be 100% relevant for the OP, but it may be useful for those who fall into this line).
The problem was that my module tested all the broken ones in Release mode, except for complaints about the availability (or absence) of SQLite.Interop.dll. I realized that when building in debug mode, the bin \ Debug folder had two subfolders (x64 and x86) with a copy of SQLite.Interop.dll, but these files / folders did not exist in release mode.
To solve this problem, I created the x64 and x86 folders in my project and added the corresponding version of SQLite.Interop.dll too, setting the Copy to ouput
parameter Copy to ouput
Copy if newer
. (I originally used Copy Always, but it seems that the MS verification mechanism does not turn off when the test run is completed, which may lock the file. Since the dll should not be changed regularly, the Copy if newer
was the appropriate approach).
This allowed my unit tests to go in release mode, but, unfortunately (as in the case of OP), they did not work when launched from the command line. I’m still trying to understand that one of them is, I think, because MSTest is 32-bit, and SQLite uses its own code, which is (possibly) 64-bit, but the finer details needed to eliminate it elude me at present time.
source share