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

  • Home
  • SEARCH
  • 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 6221039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:03:54+00:00 2026-05-24T08:03:54+00:00

I have a base project that feeds two different projects. I want to be

  • 0

I have a base project that feeds two different projects. I want to be able to have the primary project compile all the references into one dll at compile time.

This needs to be something that is built into the project build so that Jr developers don’t have to worry about it.


Solution: I ended up adding a line to the Post-build action of the project, so that a good build does the following:

$(ProjectDir)ilmerge.exe /out: /ver: <.dll> <.dll>

ilmerge.exe was moved to the project and the above line takes the dlls given and creates one.

  • 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-24T08:03:55+00:00Added an answer on May 24, 2026 at 8:03 am

    (this answer was edited to update links to new download locations and to reflect new insights)

    Your best bet is to use Micorosoft’s ILMerge. It used to be available as a separate download from Microsoft Research (it is not part of VS or the .NET SDK).

    The original version was maintained until 2012. It is now a NuGet package, which is the best way to get it presently, and to add it to your project and build server.

    As an alternative, you may want to try ILMerge GUI from CodePlex, which provides a GUI interface to ILMerge. Its development was interrupted, but is now active again.

    A Codeproject article on ILMerge explains more on how to use it and explains some use-case. An example command is:

    ilmerge /target:winexe /out:AllInOne.exe NormalProgram.exe Lib1.dll Lib2.dll
    

    As an alternative, you can use Fody with Costura.Fody, as explained in this SO response.


    Note (1): if you need to merge side-by-side assemblies (i.e., mix native 64 bit and 32 bit assemblies), you should consult this SO article on loading side-by-side assemblies dynamically.

    Note (2): to add this as an integral step to your build process, just go to Project Properties > Build Events > click “Edit Post-build” and fill in the command from above. Click “Macros” to see how to reference the current file or assembly.

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

Sidebar

Related Questions

I have a project that has mainly two objects, both inheriting from a base.
In the project I'm working on now, we have base Entity class that looks
We have many projects that use a common base of shared components (dlls). Currently
I have a base class object array into which I have typecasted many different
I have a setup project that install a couple of projects and a couple
I have a set of Eclipse c projects that will all refer to a
I have a common assembly/project that has an abstract base class, then several derived
I am making a project that sells product and I want to have a
I have a few apps in my project that I want to be reusable.
I have a project with a base view controller class, that is inherited by

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.