5

This is all hypothetical, so please bear with me.

Say I'm writing a tool in C# called Foo. The output is foo.exe. I've found some really great library that I like to use called Bar, which I can reference as bar.dll in my project. When I build my project, I have foo.exe and bar.dll in my output directory. Good so far.

What I'd like to do is link foo.exe and bar.dll so they are one assembly, foo.exe. I would prefer to be able to do this in VS2008, but if I have to resort to a command-line tool like al.exe I don't mind so much.

Mihai Limbășan
  • 64,368
  • 4
  • 48
  • 59
user6202
  • 63
  • 4

4 Answers4

10

There's ILMerge. Link

ageektrapped
  • 14,482
  • 7
  • 57
  • 72
5

Set up a post-build event under Project Properties:

ilmerge /out:$(TargetDir)foo.exe $(TargetPath) $(TargetDir)bar.dll

Claus Thomsen
  • 2,325
  • 2
  • 24
  • 27
2

Check out the ILMerge tool found here.

Abe Heidebrecht
  • 30,090
  • 7
  • 62
  • 66
1

Thanks everyone who answered!

I ended up with NuGenUnify which provides a GUI wrapper for ilmerge.

user6202
  • 63
  • 4