The target platform is probably configured on any processor, which means that when launched from VS or on 64-bit Windows, it will run as 64-bit code (and use the 64-bit Jet driver). But a typical unit test runner runs in 32-bit mode, and all assemblies assembled to it will run in 32-bit mode (since your target project platform is Any, that is, 32 or 64 bits). And Windows 7 does not ship with the 32-bit Jet driver by default.
source share