Cannot merge .NET 4.6 with ILMerge.

Jul 29, 2015 at 9:40 AM
I have VS updated to 2015 and have .NET 4.6 installed. When I try to merge dlls, Cannot merge .NET 4.6 with ILMerge. prompts but in framework 4 in selected for merging.

Any help on this....
Jul 30, 2015 at 9:37 PM
I can confirm the same behaviour. Unfortunately I get the same error also after installing the Visual Studio 2013 back on my PC and having all the DLLs and EXE compiled using VS 2013.
It seems that the app detects newer framework installed and refuses to cooperate even though it is not in use.
Nov 6, 2015 at 12:31 PM
Don't know if you came right but the following worked for me.

Using Visual studio 2015 and my project is compiled with .net 4.6

in my project properties I have post-build event command line
$(TargetDir)\AssemblyMerge.bat $(TargetPath) $(TargetDir)

In the root of my project I have a bat file "AssemblyMerge.bat" with the following inside

COPY %1 temp.exe
%2\Build\ILMerge.exe /targetplatform:"v4,%WinDir%\Microsoft.NET\Framework\v4.0.30319" /out:%1 temp.exe %2\mySecret1.dll %2\mySecret2.dll
DEL temp.exe

Hope this helps
Nov 6, 2015 at 1:43 PM
Command line is working fine. But when using Gui of ILMerge, its not merging dll's when framework 4.6 is installed on machine.
Nov 6, 2015 at 4:41 PM

Did you compare the command lines using the 'generate command line file' option?