净单元测试过程中未能加载从组装式“MapProvider” [英] Could not load type 'MapProvider' from assembly during .Net unit test
问题描述
我收到 System.Configuration.ConfigurationErrorsException
的消息未能从程序集加载类型XxxSiteMapProvider''System.Web程序,版本= 4.0.0.0,文化=中性公钥= b03f5f7f11d50a3a'。
我想单元测试一个单独的类在同一项目中的 XxxSiteMapProvider
自定义类。该错误消息指出App.config中的适当点,拿起定制SiteMapProvider和我做了搜索在整个解决方案和类名不重复任何地方。 (我看到了冲突的类名可能导致此错误的搜索。)
I'm trying to unit test a separate class in the the same project as the XxxSiteMapProvider
custom class. The error message indicates the proper point of the App.config for picking up the custom SiteMapProvider and I did a search across the solution and the class name is not duplicated anywhere. (I saw from searches that conflicting class names may cause this error.)
在如何调试这有什么建议?
Any suggestions on how to debug this?
推荐答案
尝试指定的完全限定的类型名称在以下模式的配置你的站点地图提供者。
Try specifying the fully qualified type name for your SiteMap provider in the config in the following pattern.
<namespace>.<classname>, <fully qualified assembly name including public key>
这篇关于净单元测试过程中未能加载从组装式“MapProvider”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!