Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 513163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:23:39+00:00 2026-05-13T07:23:39+00:00

I wanted to use the fluent interface in Castle Windsor. Since this isn’t available

  • 0

I wanted to use the fluent interface in Castle Windsor. Since this isn’t available in the “release” binaries for .NET 2.0 I compiled from trunk, which is reported to be fairly stable. I compiled just:

  • Castle.Core.dll
  • Castle.DynamicProxy.dll
  • Castle.MicroKernel.dll
  • Castle.Windsor.dll

This should be all that is necessary for what I need it for but things aren’t working as expected. I have an assembly collection which I iterate through and attempt to load all types contained within each assembly using the following code:

var container= new WindsorContainer();
foreach (var assembly in _assemblies)
{
    container.Register(AllTypes.FromAssembly(assembly));
} 

I stepped through the code with a debugger. _assemblies has 2 assemblies in it. Each assembly has numerous types defined in it. The loop iterates twice without error but when it completes container is still empty.

Update:
A little clarification. The latest binaries do have the fluent interface, however they target the .NET 3.5 framework. I am working with .NET 2.0. The latest binary release to support .NET 2.0 was RC3.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:23:39+00:00Added an answer on May 13, 2026 at 7:23 am

    The Register(AllTypes… syntax is only the start – you have to tell Windsor what it is that you want to register.

    For example to get all Controllers:

    container.Register(AllTypes
             .FromAssemblyContaining(representativeControllerType)
             .BasedOn<Controller>()
             .Configure(reg => reg
                 .LifeStyle.PerWebRequest));
    

    Here’s another example that registers by following the convention that all classes whose name ends in ‘Service’ should be registered:

    container.Register(AllTypes
            .FromAssemblyContaining<ConfigurationService>()
            .Where(t => t.Name.EndsWith("Service", StringComparison.Ordinal))
            .WithService.FirstInterface()
            .Configure(reg => reg.LifeStyle.PerWebRequest));
    

    If you truly want to register all types, you could write a Where clause that always returns true.

    By default, Windsor doesn’t auto-resolve concrete types.

    For more information about fluent registration API read the documentation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to use T4 to generate properties for a partial class. I'm running
I wanted to use boost::thread in my program, but get the following compiler error
I have a DataSet populated from Excel Sheet. I wanted to use SQLBulk Copy
At present I am using eclipse for JAVA project. I always wanted to use
I use emacs for viewing and editing code and other text files. I wanted
I wanted to know, while deciding which language or technology to use for implementing
The demos for the jquery ui dialog all use the flora theme. I wanted
Sorry for this long question, it is flagged wiki since I'm asking for something
I want to learn to use Fluent NHibernate, and I'm working in VS2010 Beta2,
I wanted to use Paypal's IPN service to verify payments for a recurring subscription

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.