Creating a single executable from the Data Mapper

Its sometimes advantageous to have a single executable with no external dependencies. It makes it easier to distribute and avoid versioning issues if multiple versions of product are used.
 
The easiest way to consolidate the transform exe, the transform dll, and its runtime components is to use ILMerge.
ILMerge is a Microsoft produce, however under its license we are not permitted to distribute it, so we provide instructions on its use, but can not incorporate it into the product.
 
 
It is assumed ILMerge installs to "C:\Program Files (x86)\Microsoft\ILMerge"
 
Change directory to the working folder that contains the generated exe/dlls, in this example c:\MyProject
 
cd c:\MyProject
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /targetplatform:v4 /out:MySingleExeTransform.exe DataTransformationApp.exe DataTransformation.dll LiquidTechnologies.DataMapper.Runtime.DLL
 
This will combine the DataTransformationApp.exe, DataTransformation.dll and LiquidTechnologies.DataMapper.Runtime.DLL into a single executable file called MySingleExeTransform.exe.
 
If your project makes use of JSON you may also wish to add the Newtonsoft.Json.dll to the list. 
 
Note : If the generated solution contained a DataTransformationApp.exe.config file then this will need renaming to match your single exe (i.e. MySingleExeTransform.exe.config, ensuring its is .exe.config).
 

Add Feedback