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).


Well, this isn't state of the art. A better way to solve this would be that the mapper generates a "mapping definition" file (json-like). This "mapping definition" file can be included and version controlled in my project. Also I would expect that there is a data mapper runtime that interprets the "mapping definition" file an creates the desired output. This "data mapper runtime" would be added (and updated) as a nuget package reference to my project.
Falko Gieseke (June 4, 2019 at 3:40 PM)