【发布时间】:2026-01-28 08:10:02
【问题描述】:
试图利用 Castle Windsor IoC。我有一个非常简单的应用程序。我的接口存在于 Test.Services 命名空间中。编译时出现以下异常:
“类型名Test.Services.IParse,找不到Test.Services”
这是我的 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>
谁能告诉我我错过了什么?
谢谢
-尼克
【问题讨论】:
标签: c# inversion-of-control castle-windsor