






















问题:
终于尝试在项目中应用单元测试,一开始一切都按部就班的进行,一切良好,点[运行].显示出错结果,仔细看了下,异常信息为
Test method XinGongShe.Membership.Test.AccountManagerTest.UpdateUserRankPointsTest threw exception: System.TypeInitializationException: The type initializer for 'XinGongShe.Membership.MembershipDataProvider' threw an exception. ---> System.IO.FileNotFoundException: Could not find file 'E:\Developing\XinGongShe Framework Solution\TestResults\Administrator_HEX 2009-07-28 19_23_34\Out\XinGongShe.config'..
原来配置文件没有自动复制到对应的测试目录,单元测试的生成目录是临时的,所以也不能简单的复制剪贴.
解决方案: 手工添加配置文件(针对vs2008英文版)
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。