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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:21:41+00:00 2026-05-26T03:21:41+00:00

I have VS solution that contains three projects – one builds an EXE and

  • 0

I have VS solution that contains three projects – one builds an EXE and the other two build DLLs. It’s organized this way because the DLLs contain code that is shared with other EXEs. When I deploy the EXE, I want to be able to just copy the EXE into a bin directory and have it run, without having to copy extra DLLs around. This is particularly important because other EXEs in the bin directory will have been built against earlier versions of the DLLs.

So I’ve included the DLLs built from the two projects in my EXE as embedded resources, and hooked AppDomain.CurrentDomain.AssemblyResolve to load them when the EXE runs.

And this works, except for two things:

  1. Each DLL project actually builds two DLLs, one when the configuration is “Debug” and one when the configuration is “Release”. It’d be kind of nice to include the proper build with the proper build. And
  2. If the DLLs don’t already exist, the build fails.

It’s the second that is the real problem. If the DLLs already exists, the build runs fine. But if the DLLs are missing, the build fails. So adding these dependencies only works if I build the solution without the dependencies first, and then add them in.

Which won’t work, of course. I need a solution that will build from a clean check-out.

So, any ideas?

  • 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-26T03:21:41+00:00Added an answer on May 26, 2026 at 3:21 am

    OK, here’s the problem. Each of the DLL projects creates a copy of its DLL in its own project folder, ./bin/Release/ or ./bin/Debug/.

    You can’t include them as embedded resources in the EXE project, because they are not in the EXE project folder.

    When the EXE project finishes building, it copies the project DLLs into its own ./bin/Release/ or .bin/Debug/. Because these copied files are in the EXE project folder, you can include them as embedded resources, except that you don’t want to, because they don’t exist until the build is complete, and the build won’t complete if they aren’t there.

    The solution is to put a copy of the DLLs somewhere else in your EXE project folder, and to include those copies in your assembly as embedded resources. I put them in ./DLLs/.

    And then, to eliminate the necessity of copying them by hand, I added a pre-build event:

    COPY $(SolutionDir)\myDLL\bin\$(ConfigurationName)\myDLL.dll $(ProjectDir)\DLLs
    

    Note how this will copy either the debug or the release version of the DLL, depending upon what I am building.

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

Sidebar

Related Questions

I have a solution that contains two projects. One project is an ASP.NET Web
I have three c# projects in my solution. One is a console app that
I have a C# solution in VS2010 that contains three projects. This solution has
I have a solution that contains a good deal of projects, I would like
I have a VS solution that contains 6 library projects and 1 web folder
Suppose I have a solution inside a TFS collection that contains 3 projects. Ho
I have a system that has three applications (one windows application and two web
Strange and probably trivial problem. I have three projects in one solution (.NET 2.0,
I have a solution that contains several c# projects and I would like to
I have a large solution that contains C# and C++ projects. After I code

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.