I'm using C# Express 2010. I made a WPF application with free VIBlend Edit controls, these controls uses the corresponding dlls, is it possible to create a stand alone executable? I want to copy only the exe to another machine (the framework is installed of course), but I don't want to copy the dll!
-
possible duplicate http://stackoverflow.com/questions/189549/embedding-dlls-in-a-compiled-executable – bartosz.lipinski Feb 16 '11 at 13:49
5 Answers
-
2@mzabsky, I would advice against it though. It might not be allowed by the license on the DLL. – Filip Ekberg Feb 16 '11 at 13:50
-
+1 was typing the same response. See http://research.microsoft.com/en-us/people/mbarnett/ILMerge.aspx for some more background on the tool. Filip has a point though... – Ruben Steins Feb 16 '11 at 13:52
-
@Filip Ekberg OP seems to want to do so for personal purposes. And I guess in 99% of cases the copyright infringement will be the same no matter if he copies the libraries or merges them into the library. – Matěj Zábský Feb 16 '11 at 13:55
ILMerge
Here are a couple of resources regarding ILMerge that you might find helpfull:
Using GAC
What you can do is have the DLL's registered in the Global Assembly Cache ( GAC ) on the client machine, this way it could use the assemblies from there.
But they would have to be installed into GAC.
Edit
It seems like I was wrong, however I would strongly advice against including third party dll's into one executable because it might not be allowed by the license aggreement.

- 1
- 1

- 36,033
- 20
- 126
- 183
Not really unless you have the source code to the library and then are willing to spend the time to resolve all the problem you will have when you merge the code into your executable assembly.
If you use a product to merge assemblies (such as SmartAssembly) then you can merge it all into one EXE, but SmartAssembly is not free. (It's a great product, though, that does much more than just merging assemblies)

- 4,338
- 24
- 23
3rd option (from the two already mentioned) is to package the whole thing into an installer (MSI). This would still require the DLLs be somewhere (either in the app folder or GACd), but it presents to the client in a more controlled manner. They just install the package.

- 7,767
- 1
- 25
- 31
.NET supports this out of the box. See this guide how to.

- 2,111
- 11
- 13
-
As far as I know this is only way if you are using wpf add dll as embedded resources and load them dynamically into appdomain by reading resources stream. – bartosz.lipinski Feb 16 '11 at 14:06
-