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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:37:59+00:00 2026-05-25T00:37:59+00:00

If assembly A (which is executable) references assembly B, should it reference all assembly

  • 0

If assembly A (which is executable) references assembly B, should it reference all assembly B’s references (even if it doesn’t use classes which use these references)?

  • 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-25T00:38:00+00:00Added an answer on May 25, 2026 at 12:38 am

    EDIT: There is now a certain amount of confusion about the circumstances under which indirect references are copied into the output folder of the “main” project. It may well depend on the version of Visual Studio, aside from anything else. Visual Studio 2010 appears to use a certain amount of intelligence in working out which indirectly referenced assemblies might actually be used – but the exact logic is a mystery to me at the moment.

    If in your situation all the required assemblies end up being copied, then you might as well leave your list of references short – but it’s probably worth looking at whether some indirect references are missing, and whether they’re important to you or not. In particular, any references which are present in B but only loaded by reflection may not end up being copied…


    Older answer

    Not necessarily – if it doesn’t use any functionality in B which needs the other references even indirectly then it’s fine not to add the extra references. However, this means relying on the implementation details of which features in B require which extra references. I think it’s typically safer to add all the references unless there are very clear guidelines from the provider of B as to which references are needed in which cases.

    EDIT: Just to be clear, you don’t have to add references, so long as B has all the assemblies it needs available at execution time. The simplest way to make sure they all get copied along with A is to add references to A. It’s more of a deployment simplification than anything else. If B‘s references are being loaded from the GAC anyway (not something I personally like) then it won’t matter at all; if they’re being loaded locally but you’re willing to copy the files explicitly into the deployment folder, that’s fine too… but adding the assemblies to the list of A‘s assembly references is simpler. (I think it’s logical, too – they’re still assemblies A needs in order to execute correctly, even though it’s an indirect requirement.)

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

Sidebar

Related Questions

how can i find all classes in my assembly which their name space start
I have an assembly which should not be used by any application other than
If I have an assembly (A) which references another assembly (B). I want to
Me stupid. How can I know which assembly to reference if I just know
I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display
I have a .NET project which references another assembly that is built outside of
I'm developing a C# assembly which is to be called via COM from a
I've got a c# assembly which I'm invoking via COM from a Delphi (win32
How can I create a custom property for my .Net assembly which would then
Is there a way to get the path for the assembly in which the

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.