温莎城堡找不到我的服务类型 [英] Castle Windsor Cannot find my Service Type

查看:53
本文介绍了温莎城堡找不到我的服务类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图利用温莎城堡IoC。我有一个非常简单的应用程序。我的接口存在于Test.Services命名空间中。编译时出现以下异常:

Trying to make use of the Castle Windsor IoC. I have a very simple application. My interfaces exist in Test.Services namespace. I get the following exception when compiling:

类型名Test.Services.IParse,无法找到Test.Services

"The type name Test.Services.IParse, Test.Services could not be located"

这是我的app.config:

This is my app.config:

<configuration>
  <configSections>
    <section name="castle"
      type="Castle.Windsor.Configuration.AppDomain.CastleSectionHandler,    
      Castle.Windsor" />


   </configSections>

  <castle>
    <components>
      <component id="HtmlTitleRetriever"
                 type="Test.HTMLTitleRetriever, Test">
      </component>
      <component id="FileParser"
                 service="Test.Services.IParse, Test.Services"
                 type="Test.FileParser,   
                      Test">
      </component>
      <component id="FileDownloader"
                 service="Test.Services.IDownload, Test.Services"
                 type="Test.FileDownloader, Test">
      </component>
    </components>
  </castle>

有人可以告诉我我在想什么吗?

Can someone tell me what I'm missing?

谢谢

-尼克

推荐答案

愚蠢的问题,但是您确定包含您注册的类的程序集实际上已复制到输出目录吗?

Stupid question, but are you certain that the assembly containing the class you register gets actually copied to the output directory?

这篇关于温莎城堡找不到我的服务类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆