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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:33:11+00:00 2026-05-26T16:33:11+00:00

I’m using Visual Studio 2010 and C# to build WinForms apps and class libraries.

  • 0

I’m using Visual Studio 2010 and C# to build WinForms apps and class libraries. I have some common libraries that I use for all products, and then some product specific libraries for my apps. None of my assemblies are GAC’d. All projects copy their output from their respective bin\Debug folder to a common Repository folder, and all assembly references are pointed to that Repository folder.

For example, Common.DAL.dll, Common.BLL.dll, Product.DAL.dll, Product.BLL, and Product.exe

The references between assemblies are typically something like this:

  • Product.exe includes reference to Product.BLL
  • Product.BLL includes references to Common.BLL and Product.DAL
  • Product.DAL includes reference to Common.DAL
  • Common.BLL includes refrence to Common.DAL

When all these are included in the same solution, the build depencies are something like this:

  • Common.BLL depends on Common.DAL
  • Product.DAL depends on Common.DAL
  • Product.BLL depends on Common.BLL and Product.DAL
  • Product.exe depends on Product.BLL

Which makes the build order something like this:

  1. Common.DAL
  2. Common.BLL
  3. Product.DAL
  4. Product.BLL
  5. Product.exe

Frequently, when attempting to run an app, I get the following error:

Could not load file or assembly ‘Common.DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4e5249f2e70e1da8’ or one of its dependencies. The system cannot find the file specified.

I have traced the problem down to the fact that not all of the assemblies built from the solution end up in Product.exe’s bin\Debug folder.

If I clean the solution, and then rebuild it, the files appear something like this:

  • Common.DAL\bin\Debug contains Common.DAL.dll
  • Common.BLL\bin\Debug contains Common.BLL.dll and Common.DAL.dll
  • Product.DAL\bin\Debug contains Common.DAL.dll and Product.DAL.dll
  • Product.BLL\bin\Debug contains Common.BLL.dll, Common.DAL.dll,
    Product.BLL.dll and Product.DAL.dll
  • but Product.exe\bin\Debug contains only Product.exe, Product.BLL and
    Product.DAL. It is missing the Common assemblies. So when I run
    Product.exe, I get the error listed above.

I have checked the properties of all of my projects and properties. They are all using .NET Framework 4. All references to my assemblies have ‘Specific Version’ property set to false, and ‘Copy Local’ property set to true.

I can force the missing assemblies to be copied to Product.exe\bin\Debug by adding references to the Common assemblies in the Product.exe project, but since Product.exe doesn’t explicitly use the Common assemblies, this feels more like a kludge than a solution.

I’ve looked through MSDN and Visual Studio documentation to see if I could find out what influences or affects the copying of referenced assemblies, and I’ve searched SO for similar issues, but I haven’t found anything helpful.

I’m at a loss for where to go or what to do next.

  • 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-26T16:33:12+00:00Added an answer on May 26, 2026 at 4:33 pm

    In your question you say:

    I can force the missing assemblies to be copied to
    Product.exe\bin\Debug by adding references to the Common assemblies in
    the Product.exe project, but since Product.exe doesn’t explicitly use
    the Common assemblies, this feels more like a kludge than a solution.

    I don’t think I concur. It’s not perfect, but Visual Studio sometimes requires this even intra-solution. It depends on how you are using the class.

    While you may think it is a little kludge, it seems like your other (dare I say “kludgy”) requirements (one project per solution) make things seem kludgy

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

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I have thousands of HTML files to process using Groovy/Java and I need to
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text

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.