我试图测试在VS2010使用MSTest的我自定义的成员提供,但不断收到错误System.TypeLoadException: Could not load type 'TafAdris.Security.TafAdrisMembershipProvider' from assembly 'TafAdrisSecurity'.
单元测试客户成员提供
很多挣扎后,我意识到,MSTest的找不到我总成即使我在参考文件夹中指定了Copy Local。接下来,我尝试调试单元测试,并在Watch窗口中输入Environment.CurrentDirectory。我得到以下文件夹:
C:\Users\XYZ\Documents\Visual Studio 2010\Projects\CustomSecurityProviderApp\TestResults\XYZ_PCNAME 2011-10-11 18_24_55\Out
但测试项目输出文件夹在一个完全不同的指定位置。有没有人有类似的问题?你知道如何强制MSTest从特定位置加载DLL吗?
我试着在测试设置 - >单元测试中指定额外的文件夹,但似乎被忽略。