I\'m using VSTS 2K8 and I\'ve set up a Unit Test Project. In it, I have a test class with a method that does a simple assertion. I\'m using an Excel 2007 spreadsheet as my
Solutions that I tried 1) Added data file in deployment section of local settings 2) Changed the properties of the file to "Content" and "Copy if newer" 3) Hard-coding the location of the file in deployment item attribute and in the connection string in app.config file.
None of the above worked.
Eventually I found out that the registry did not have the Jet dlls registers. I exported the Jet folder(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Jet) from the registry of a machine on which I was not getting the error and imported that on to the machine I was getting the error. This resolved the issue for me.