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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:09:40+00:00 2026-05-16T11:09:40+00:00

So something I’ve been doing recently is adding an additional project to my code

  • 0

So something I’ve been doing recently is adding an additional project to my code solutions and doing my post build stuff programmatically in it. This project builds last and then launches itself.

cool stuff I can do there is run an ILMerge automation class I created to perform merges automatically if i just give it a project folder, increment version numbers in my assembly info, copy files where-ever i want, etc etc etc. It seems to me like the possibilities here are endless.

example of one I’m working with now — I’ve got a fairly large framework library that i’m going to be deploying with one of our applications, but we don’t want to include all the dlls separately (there are like 20). Also I don’t need every class in the library for this application, so it makes sense to trim it down. In the library’s post build project, I’m doing this…

outputDirectory = new DirectoryInfo(@"...postbuildmerges\output");
solutionDirectory = new DirectoryInfo(@"...mainSolutionDirectory");

#region Web Lib
List<string> webLibraryNames = new List<string>
{
    "Lib.Configuration",
    "Lib.Web",
    "Lib.Data",
    "Lib.Utilities",
    "Lib.Threading"
};
List<string> AllNeededAssemblies = new List<string>();
webLibraryNames.ForEach((libname) => 
    {
        foreach (string assembly in GetLibraryAssemblies(libname))
            if (AllNeededAssemblies.Exists((assemblyName) => Path.GetFileName(assemblyName) == Path.GetFileName(assembly)) == false)
                AllNeededAssemblies.Add(assembly);
    });

SharpMergeAutomator.Merge(
    @"...path to primary assembly...",
    AllNeededAssemblies.ToArray(),
    "...desired output file...",
    //merges xml documentation
    true);
#endregion

So is this post-build project thing a good approach? is it needlessly complicated? is there a better way? do people normally do stuff like this?

  • 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-16T11:09:40+00:00Added an answer on May 16, 2026 at 11:09 am

    MSBuild is the scripting language for builds, it gives the ability to easily iterate folder trees committing actions against any filter of files you like etc. You should be doing these things in an MSBuild script I would posit because when a new .net comes out, it will most likely still be the scripting language for builds, and you wont have to change the build scripts to work with the new .net, whereas the more build work you do in code like this, that’s just more code you’ll have to rewrite as files and things have moved. Plus with MSBuild you get logging by default along with tons of built in stuff.

    Also, there are lots of community tasks to easily use for things like ILMerge:
    http://code.google.com/p/ilmerge-tasks/wiki/HowToUse

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

Sidebar

Ask A Question

Stats

  • Questions 538k
  • Answers 538k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer here it givest an access violation in splitBuffer on this… May 17, 2026 at 1:59 am
  • Editorial Team
    Editorial Team added an answer Comparing the lists with == requires elements to be comparable… May 17, 2026 at 1:59 am
  • Editorial Team
    Editorial Team added an answer Translucent PNG, perhaps? Did you know that BMP files can… May 17, 2026 at 1:59 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Something like this, I'd like to see the full syntax. Pseudo Code: var =
Something I have always been interested in out of curiosity, is there a tool
Something like var life= { users : { guys : function(){ this.SOMETHING.mameAndDestroy(this.girls); }, girls
Something bother me a lot... On a big project with many dependencies, some of
Something like this <a id=a1 runat=server href=~/> <img id=logo runat=server src=/_assets/images/logo.png alt= /> </a>
I have a jquery bug and I've been looking for hours now, I can't
Something i've never really done before, but what is the best way to make
Something that has always bugged me is how unpredictable the setTimeout() method in Javascript
Something that would really reload the page or resource, ignoring whatever might be in
Something else perhaps? I am already using nHibernate, but I get occasional issues where

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.