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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:59:19+00:00 2026-05-27T18:59:19+00:00

Situation: Project 1 is an assembly in the solution Project 2 is an executable

  • 0

Situation:

  • Project 1 is an assembly in the solution
  • Project 2 is an executable assembly project in the same solution
  • Project 2 has a project reference (via Add Reference) to Project 1
  • Project 2 does not directly refer to namespaces/types in Project 1 in the code
  • Project 2 uses Ninject to dynamically load Project 1 and use the implementation classes within it

Problem:

  • Even though Copy Local is set to True for the reference, and the referenced assembly does not exist in the GAC, the referenced assembly is not copied to the output build directory
  • Ninject subsequently does not find the assembly, and so the binding/resolution fails

This process works fine for an identical setup where some classes in the referenced assembly are referenced directly, as well as loaded by Ninject, so I believe the cause is as follows: If VS detects that no types within a referenced assembly are referred to in code, it won’t copy the referenced assembly, even if it’s added as a reference with Copy Local = True.

Solution(s):

  • Find a way of telling VS, “Copy Local (I really mean it)” = True — this would be my ideal solution.
  • Add a file reference to the referenced assembly. Not great since I lose the advantages of a project reference (which may or may not be entirely in my head).
  • Refer to the assembly in some ‘token’ way in code. Messy – I’d like to use the References list to maintain a list of assemblies/modules I want to include.
  • Post-build steps to copy the assembly around. Messy, not ideal.

Can anyone help with the first solution, or suggest another?

  • 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-27T18:59:20+00:00Added an answer on May 27, 2026 at 6:59 pm

    Aha.. the referenced assembly targeted .NET Framework 4.0, but the referencing assembly was targeting the Client Profile version of .NET 4.0.

    The reference was added, appeared, no problems or warnings at all (from the UI or VS at least), but I couldn’t refer to it in code, and it wouldn’t appear in the output.

    If anyone has ideas why this went undetected, perhaps they could let me know?

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

Sidebar

Related Questions

This is not a ruby/rails project deploy. I have the following situation and I
Situation: There is a Project Resource that has many Resources A each of them
I'm in a situation where I've got a project that has a large number
I have the following situation Project A - Uses Castle Windsor v2.2 - Uses
Situation I have been working on a project lately where the UI development seems
The situation is like this : Main project A. and a class library B.
In the situation of having a project initiated by a marketing or sales team,
Here is my situation: I have a C project linking with many libraries (I
I have a situation where another developer is including source files from a project
If you end up in a situation that main developer of project you are

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.