I have a Windows C# program that uses a C++ dll for data i/o. My goal is to deploy the application as a single EXE.
What are the steps to create such an executable?
I have a Windows C# program that uses a C++ dll for data i/o. My goal is to deploy the application as a single EXE.
What are the steps to create such an executable?
Thinstall is one solution. For a native windows application I would suggest embedding the DLL as a binary resource object, then extracting it at runtime before you need it.
Have you tried ILMerge? http://research.microsoft.com/~mbarnett/ILMerge.aspx
ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. It is freely available for use from the Tools & Utilities page at the Microsoft .NET Framework Developer Center.
If you're building the C++ DLL with the /clr
flag (all or partially C++/CLI), then it should work:
ilmerge /out:Composite.exe MyMainApp.exe Utility.dll
It will not work with an ordinary (native) Windows DLL however.
You might ask "Why deploy as a single exe?". If it's because the software needs to have a easy install- consider creating an easy install app that can be packaged as a single exe.
I have built a managed assembly from managed and unmanaged code, but the managed and unmanaged code resided in their own DLLs.
PostBuild from Xenocode can package up both managed and unmanged into a single exe.