The problem is in you config file. You are mixing two concepts with some incorrect syntax.

The <assembly... /> and <namespace ... /> nodes provide an assembly and namespace search order when your <register ... /> node contains a type that cannot be found by itself. If a type cannot be found, it searches through all combinations of [namespace].Type, [assembly]. Here's where the error is: it does NOT search for Type, [assembly]. If any <namespace ... /> nodes are defined, it does NOT try appending only the assembly.

So your <register type="Biblioteca.Contracts.IManterCategoriaBO" mapTo="Biblioteca.Business.ManterCategoriaBO" /> node has the type Biblioteca.Contracts.IManterCategoriaBO which does not contain the assembly, so it cannot be found. Therefore, it needs to do a search. You did specify <namespace ... /> nodes, so it will first tryBiblioteca.Biblioteca.Contracts.IManterCategoriaBO, Biblioteca. Notice the duplicate Biblioteca name.

Here's a corrected config file.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" />
</configSections>
<unity xmlns="http://schemas.microsoft.com/practices/2010/unity">
<assembly name="Biblioteca" />
<assembly name="Biblioteca.Contracts" />
<assembly name="Biblioteca.Business" />
<namespace name="Biblioteca" />
<namespace name="Biblioteca.Contracts" />
<namespace name="Biblioteca.Business" />
<container>
<register type="IManterCategoriaBO" mapTo="ManterCategoriaBO" />
<!-- Or this works -->
<!--<register type="Biblioteca.Contracts.IManterCategoriaBO, Biblioteca" mapTo="Biblioteca.Business.ManterCategoriaBO, Biblioteca" />-->
</container>
</unity>
</configuration>

unity 4 Please check your configuration file and verify this type name.的更多相关文章

  1. Unity Ioc 类型初始值设定项引发异常,The type name or alias SqlServer could not be resolved. Please check your configuration file and verify this type name.

    先看一下unity的配置信息 <unity> <typeAliases> <typeAlias alias="IDatabase" type=&quo ...

  2. mha安装报错 [error][/usr/share/perl5/vendor_perl/MHA/MasterMonitor.pm, ln361] None of slaves can be master. Check failover configuration file or log-bin settings in my.cnf

    查找资料 参考 http://blog.51cto.com/16769017/1878451 解决方法: 在两个从库上开启二进制日志即可(花了 一天时间,找不到解决方法,最后还是靠自己的理解及测试解决 ...

  3. The type name or alias SqlServer could not be resolved.Please check your configuration

    The type name or alias SqlServer could not be resolved.Please check your configuration file.... 检查一下 ...

  4. phpmyadmin Wrong permissions on configuration file, should not be world writable!

    巴拉巴拉,实际场景是这样,因为有需要,所以想用django 做个rest服务给其他平台提供服务,发现以前正常的页面都无法运行,奇怪发现有一个页面提示连接不上mysql 难道mysql挂了,打开phpm ...

  5. How to find configuration file MySQL uses?

    http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today ...

  6. This configuration file was broken by system-config-keyboard

    posts • Page of problem with startx Postby evarie » // :: Normally i can get started with the x wind ...

  7. How to find configuration file MySQL uses?(转)

    http://www.dbasquare.com/2012/04/01/how-to-find-mysql-configuration-file/ A customer called me today ...

  8. 解决Scala Play框架在Git Bash运行的异常:Could not find configuration file ../framework/sbt/sbt.boot.properties

    Git Bash+ConEmu可以模拟Linux强大的命令行.不过在结合Scala和Play时,需要注意如下事项: 1. Scala的安装在64位操作系统下,默认会放在“C:\Program File ...

  9. Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the co

    log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFact ...

随机推荐

  1. Mac可设置环境变量的位置、查看和添加PATH环境变量

    Mac 启动加载文件位置(可设置环境变量) 首先要知道你使用的 Mac OS X 是什么样的 Shell,使用命令 echo $SHELL 如果输出的是:csh 或者是 tcsh,那么你用的就是 C ...

  2. VM命令行操作

    vim-cmd  vmsvc/getallvms /查看ESXi上所有虚拟机信息,主要查看虚拟机对应的ID号 vim-cmd vmsvc/power.on <VM ID>  /对应ID的虚 ...

  3. iOS教程

    iOS绘图教程: http://www.cocoachina.com/industry/20140115/7703.html iOS基础教程:--包含脚本 swift http://bbs.zxope ...

  4. HDU 4054

    http://acm.hdu.edu.cn/showproblem.php?pid=4054 模拟题,对一个字符串的每个字符输出16进制表示的数字,每行处理16个字符,后面再把这16个字符输出,大小写 ...

  5. 分享25个CSS前端网页设计常用技巧

    1.ul标签在Mozilla中默认是有padding值的,而在IE中只有margin有值.2.同一个的class选择符可以在一个文档中重复出现,而id选择符却只能出现一次;对一个标签同时使用class ...

  6. python 各种控制语句

    python的控制语句分为: if: if condition: cmd elif condition:#该块为可选 cmd else:#该块为可选 cmd while: whlie conditio ...

  7. 关于cocos2d-x 与 cocos2d-html5 资源预加载的思考

    移动端资源预加载,可以做到需要加载的时候,从本地磁盘加载到内存,当纹理不需要的时候,都是强制清理内存里的纹理占用: cc.TextureCache.getInstance().removeAllTex ...

  8. R编程感悟

    虽然大学阶段曾经学过C++, matlab等编程,但是真的几乎完全还给了老师- 所以,我一直将R 作为自己真正学习的第一门语言.我从2012年初在来美国的第二个rotation中开始接触到了R.当时不 ...

  9. sprintf 用法

    字符串格式化命令,主要功能是把格式化的数据写入某个字符串中 试试下面的代码就知道了 #include<cstdio> #include<cstdlib> using names ...

  10. Android——多线程编程练习题

    随便选择两个城市作为预选旅游目标.实现两个独立的线程分别显示10次城市名,每次显示后休眠一段随机时间(1000ms以内),哪个先显示完毕,就决定去哪个城市.分别用Runnable接口和Thread类实 ...