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 121935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T04:02:57+00:00 2026-05-11T04:02:57+00:00

Take the following useless program: class Program { static void Main(string[] args) { IUnityContainer

  • 0

Take the following useless program:

class Program {     static void Main(string[] args)     {         IUnityContainer unityContainer = new UnityContainer();         IWindsorContainer windsorContainer = new WindsorContainer();          Program unityProgram = unityContainer.Resolve<Program>();         Program castleProgram = windsorContainer.Resolve<Program>();     } } 

The UnityContainer will return me an instance of Program, where as the Windsor container will throw a ComponentNotFoundException.

I can see arguments for both behaviours and don’t mind which I end up with, however Prism V2 Drop 8 (the latest at time of writing) relies on the Unity behaviour internally, requesting classes that haven’t been registered.

Rather than find and register all these classes for Prism I’d much rather just make Windsor behave like Unity. I haven’t found anything on google to help me do this (although my terminology may be wrong) and the Windsor documentation is quite bad…

Can anyone suggest a solution to this problem?

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T04:02:57+00:00Added an answer on May 11, 2026 at 4:02 am

    Windsor currently does not support that, and it’s by design. The reasoning is that you should explicitly register types you need so that you dont get misconfigured object.

    There is however a possibility that there will be added a hook to create non-registered type at some point in the near future, as this is needed by the WCF integration facility. (Edit – it was added in v2.1 – take a look at ILazyComponentLoaders)

    Anyway, regardless of lazy component loaders, the best you can do is to use fluent API to batch register all types from an assembly matching your needed criteria upfront. It’s not much more code and you’ll sleep better at nights.

    Use lazy loaders only if you have really not enough information at startup (in your composition root) to determine what components you’ll need.

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

Sidebar

Ask A Question

Stats

  • Questions 202k
  • Answers 202k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I know that TextBlock can present FlowDocument What makes you… May 12, 2026 at 8:19 pm
  • Editorial Team
    Editorial Team added an answer You probably haven't declared the method yet in the header… May 12, 2026 at 8:19 pm
  • Editorial Team
    Editorial Team added an answer I have developed with groovy on grails and ruby on… May 12, 2026 at 8:19 pm

Related Questions

What are the implications of running a Microsoft Access Database in both 2003 and
Please examine the following code: if (foo->bar == NULL); foo->bar = strdup("Unknown"); I spent
I ask this question in the hope of collecting all the incompatible changes/bugfixes in
We had a meeting this morning about how would should store our ID for

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.