Introduction
BMerge can merge application with assemblies in single
.exe file. Just like ILMerge or IL-repack, but simplier. I created BMerge because other tools didn't worked correctly with our project. BMerge is just packs assemblies as embedded resources and produces executable file, that loads them on startup (in contrast with ILMerge, that recompiles IL). So, if your assemblies can be loaded with
Assembly.Load(), BMerge may be useful to you.
Usage
Overview
bmerge -e entry-file.exe -i input-file1.dll;input-file2.dll -o output.exeWhere
entry-file is main executable file of application and
input-filesX are it dependencies.
You can specify
--console-application option to get console-subsystem application.
You can also inherit an icon, version and manifest from entry file by specifing options
--inherit-icon,
--inherit-version and
--inherit-manifest.
Note: BMerge works only with executables, not with libraries.
Usage exampe
Using BMerge for bootstrapping:
@echo off
rem because clr locks files
copy bmerge.exe bmerge.copy.exe
rem bootstrap
mkdir boot
bmerge -e bmerge.copy.exe -i template.exe;Mono.Cecil.dll;Vestris.ResourceLib.dll;CommandLine.dll -o .\boot\bmerge.exe --inherit-version --console-application --bootstrap
rem bootstrap again
mkdir build
boot\bmerge -e bmerge.exe -i template.exe;Mono.Cecil.dll;Vestris.ResourceLib.dll;CommandLine.dll -o .\build\bmerge.exe --inherit-version --console-application --bootstrap
Problems
Instance property
Location of class
Assembly will not work correctly for merged assemblies.