tags:

views:

116

answers:

4

Hi Everyone,

I'm creating a windows desktop application using .NET Framework (Visual Studio '08). As you know, when we build our application all references which we used in our application their dll copied into the Debug/Release folder with an executable file of application. Is it possible when you build only a single executable file produce and all its references embedded into the executable? I want to hide references that I used in my application.

Thanks.

A: 

Try using any of the Linker tools. Here is one you can try

Vinay B R
A: 

You can get some mileage out of ILMerge. Check out this brief CodeProject tutorial.

kbrimington
@kbrimington: Seeing your response to my comment, I wanted to let you know it wasn't me who downvoted :)
Merlyn Morgan-Graham
@Merlyn - no need. I had only wanted to understand what you were saying about .NET dependencies. One of the neat things about SO is exposure to different outlooks. I do wish folks would explain downvotes, though. I've found ILMerge to be helpful.
kbrimington
I'm also curious why this (and the other answer suggesting ILMerge) got downvoted without explanation.
Alex Paven
+1  A: 

You can embed the DLLs as resources and then handle the AppDomain.AssemblyResolve event. See the third example ("Packing a single-file executable") at http://www.albahari.com/nutshell/ch16.aspx.

Mark Cidade
A: 

Seems ILMerge is what you are looking for.

Amby