How does the "framework" box works?

Dec 19, 2012 at 3:41 PM


I'd like to ask another question. What's the meaning of the Framework box?

I developed a program in Framework 4, and tried converting it to version 2 through Visual Studio, and it gave me so much headache that I gave up. Now, I've tried choosing Framework 2 on ILMerge-Gui, and it simple works. How is that possible? Will it work like this in any scenario?

Dec 19, 2012 at 4:16 PM


The combobox contains the detected frameworks on your computer and uses the selection to set the SetTargetPlatform option/switch.

I assumed it did not much more then mark the executable as requiring a particular framework (preferably the correct one).

But the text from ILMerge.doc suggest just just what you experienced. It will however only work (my guess) if you only use features from the target framework (so for example no Lisnq calls for a target v1.1).

This method sets the .NET Framework for the target assembly to be the one specified by
platform. Valid strings for the first argument are "v1", "v1.1", and "v2". The "v" is case
insensitive and is also optional. This way ILMerge can be used to "cross-compile", i.e.,
it can run in one version of the framework and generate the target assembly so it will run
under a different assembly. The second argument is the directory in which mscorlib.dll
is to be found. NOTE: This option exists only in the v2 version of ILMerge, not the v1.1

Bottom line: quite an iteresting feature.

Wim van der Vegt