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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:26:47+00:00 2026-05-31T17:26:47+00:00

I am heavily using dependency injection in my application. As such, my components reference

  • 0

I am heavily using dependency injection in my application. As such, my components reference interfaces, and the concrete implementations are known only to my IoC container, configured through XML files.

A consequence of this design is that I end up needing assemblies in my bin folder (e.g. Newtonsoft.Json, SqlLite) that I have no need to reference in my project. In fact, I explictly do not want references, as I or my team may accidentally refer to a concrete implementation rather than an interface, thereby destroying the advantages of the DI we’re using.

The _bin_DeployableAssemblies folder introduced in VS 2010 SP1 was useful for this scenario, but applied only to web projects (I’m personally using MVC3 and ok with that, but it doesn’t solve the general problem. However, it appears to be more or less deprecated in VS11 Beta. Copying the files into the bin directory prior to build feels icky – the bin folder is no longer a container for build artifacts. I suppose a custom post-build event could be used, but it seems there should be something more “out of the box” to solve this problem. Am I stuck with post-build? What other ways are there to tackle this issue?

  • 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-31T17:26:48+00:00Added an answer on May 31, 2026 at 5:26 pm

    There are a couple of ways to handle this:

    1. A post-build event to copy the files into the bin folder will handle this.
    2. Include the files as content items in the Project, but not as references. They can be set to copy to the output folder on build.

    I sometimes use the second option. This does have the advantage of keeping the “dependency” obvious to developers, while still preventing them from actually using the types defined within the assemblies, as they are not references and the compiler will not see them as available.

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

Sidebar

Related Questions

so I'm using LinQ2SQL quite heavily in my current application, and although I have
I'm writing a framework for business objects.. I'm heavily using interfaces because of: 1)
If you are programming an application which is heavily using the network (e.g. pings,
i am implementing a PHP application, i am using AJAX heavily in forms to
I'm using XML Serialization heavily in a web service (the contracts pass complex types
In an application that heavily relies on .htaccess RewriteRules for its PrettyURLs (CakePHP in
I currently have heavily multi-threaded server application, and I'm shopping around for a good
Developing a heavily XML-based Java-application, I recently encountered an interesting problem on Ubuntu Linux.
My application heavily uses the UIImage object to change images on a single UIImageView
We have a thick client app using jQuery heavily and want to profile 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.