Unit Testing Error - The unit test adapter failed to connect to the data source or to read the data

后端 未结 6 451
野趣味
野趣味 2021-01-12 13:07

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

6条回答
  •  星月不相逢
    2021-01-12 13:43

    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.

提交回复
热议问题