Automatic ILMerge on MSBuild

Every CRM developer at some point of his/hers carrier gets to this point: to merge or not to merge. Sometimes it just immpossible to avoid it.


Sometimes because it’s just easier, sometimes it’s just because of cloud environment. Sometime because client wants to.

How to do it?

Everyone has heared about ILmerge. Sure you can write powershell scripts, batch files or VisualStudio post build steps. But it just take to much time – and for sure there are plenty of places you can make a mistake in.

My choice is to use VS extension which will automatically merge output dlls into one. All referenced dlls which are copied to output catalog will be merged. Simple and easy.

Extension is available as NuGet package: PM> Install-Package ILMerge.MSBuild.Tasks. You can find it here.


2 thoughts on “Automatic ILMerge on MSBuild”

  1. Sure. Anything (3rd party dll) that will be copied to output folder will be merged. Thanks

Have an own opinion?