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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T09:30:17+00:00 2026-05-21T09:30:17+00:00

I have an app which contains views which inherit from IView (project A) I

  • 0

I have an app which contains views which inherit from IView (project A)

I have Windsor IoC Container as a Singleton in another project (project B)

Project A has a reference to project B, and makes a static call to the container to resolve the concrete type for particular views

If I use XML configuration to configure my container then all is well and good.

If I try to use the fluent interface for configuring my contrainer I get a circular reference, as I now need project B to reference project A in order to specify the interfaces and concrete types

So what is the best way to go about this using the fluent interface?

EDIT:

Project A has this on app startup :

IoC.Instance.Start(); // this configures the container from config
IoC.Instance.Container.Resolve<IBootStrapper>().Start();

Where IoC is a static class defined in Project B

  • 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-21T09:30:18+00:00Added an answer on May 21, 2026 at 9:30 am

    Best is to design your application around dependency injection (constructor injection) and configure the container at the startup path (composition root) of your application. Ideally, your project B should not have a dependency on the DI container itself, or at most have some bootstrapping code in the project that allows creating the configuration for that project.

    When you register the container in the startup project (possibly project A in your case) you won’t have a circular reference.

    UPDATE

    In the comments you explained that your Project B project is solely for IOC bootstrapping. There is nothing wrong in having a bootstrapper project, because this will allow you all the other projects completely clean from the use of any IOC container. You would typically use a bootstrapper project if you have multiple libraries that are reused by multiple applications (for instance a business layer that is used by a web app, a web service and a windows service).

    The bootstrapper project should however, only bootstrap ‘static’ dependencies of the reusable projects. There is no sense in configuring things that change per application project. Next, since the bootstrapper is in itself a reusable project, you don’t want it to have a dependency on one of your application projects, since that would be the part you will be swapping. What’s the use of having a reference to a ASP.NET web app when running a Windows Service? That would be yucky.

    A bootstrapper project is especially useful when having multiple application projects, but this doesn’t mean that you can’t use it in a single application solution. Still the same rules apply here, since you would end up with circular references, as you already noticed.

    In other words, the solution is simple: Let the bootstrapper only bootstrap dependencies for the projects below and not the application project. If however, the application project is the only project you have, you don’t need a bootstrapper project; it won’t work.

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

Sidebar

Related Questions

I have an app which contains a scrollview with several tableviews. Each tableview is
I've created an app which contains form and that have to filled up in
I have a need for a model(?) on my app which basically contains a
I have an object which contains models for my ASP.NET MVC web app. The
I have CoreData in my app, with an Entry class, which contains an NSOrderedSet
in my winforms app, I have a Queue which contains objects: Queue<MyObj> _queuedRows =
I have a J2EE app deployed as an EAR file, which in turn contains
I have a app which will download a file from web. The download action
Currently on iOS 5 I have an iPhone application that contains web views which
I have an app with a mainwindow which contains a tabbar controller and a

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.