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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:13:54+00:00 2026-05-29T05:13:54+00:00

I want to Resolve a type without having a reference to the project where

  • 0

I want to Resolve a type without having a reference to the project where the type exist.
I want that the Resolve will load the correct assembly in runtime.

The issue is = that in runtime I decide which type to use… and according to that I want to load the correct assembly.

How can I do it?

thanks

  • 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-29T05:13:55+00:00Added an answer on May 29, 2026 at 5:13 am

    What do you expect Unity to do? Vodoo?

    You can either configure Unity using app/web.config and just drop the required assemblies in your app base folder. But that is configuration at design time.

    Or you use code to configure the container which either lets you use Assembly.Load to get access to all assemblies that are not directly referenced by your app domain. Then you would have to use reflection of some kind to extract the types that will be dynamically registered.

    Or you can skip the “let’s be even more dynamic” approach and reference all neccessary assemblies in some kind of bootstrapper.

    The third alternative would be to modularize your code configuration and use conventions to register those modules at runtime. Unity does not support this third approach out-of-the-box but there is a port of the StructureMap config engine available in the TecX project. See the documentation or the code in the TecX.Unity.Configuration project. Tests are available to demonstrate how it works.

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

Sidebar

Related Questions

I'm creating a method that will use CastleWindsor to try to resolve a type,
I want to run MbUnit tests with Icarus and/or Echo without having to install
I want to access type variables in an instance, that don't show up in
I want to Resolve ~/whatever from inside non-Page contexts such as Global.asax (HttpApplication), HttpModule,
I want to parse the following XML document to resolve all entities in it:
want to know why String behaves like value type while using ==. String s1
Using Castle Windsor, I want to configure a generic service with a type parameter;
I have the following code that was written without Tests but is actually quite
I'm using UnityContainer, and I want to register an interface not with a type,
I want to create a user control DerivedUserControl.ascx that derives form another user control

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.