The provider "Microsoft.ACE.OLEDB.12.0" is not registered on the local machine

I installed the "Microsoft Access Database Engine 2010 Redistributable Distribution" as described in the blog post

http://danielcai.blogspot.com/2011/02/solution-run-jet-database-engine-on-64.html

and it works in my windows-forms application. Now I want to add some unit tests, and when I run the unit test, I get the above error. I checked my links, but I canโ€™t understand why it works in the application, and not in the unit test.

I work in VS2010 on installing Windows 7 Ultimate x64.

Can anyone help me out?

+4
source share
1 answer

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.

+2
source

All Articles