1

I have an application that I have embedded multiple DLLs into a single EXE file using the ILMerge-GUI software (v2.0.9). My target platform is .NET 4.0 which for some reason is not listed under the target framework options in this software.

ILMerge Options

However when looking at the generated CMD argument file, when .NET Framework 4.5 is selected, the actual framework selected is:

/targetplatform:4.0,"C:\Windows\Microsoft.NET\Framework64\v4.0.30319"

Even though this is the target framework, my application will only run on computers that have .NET Framework version 4.5. The .NET versions were checked with the command line argument below

wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version

Why is there no option for .NET Framework v4.0? Why does my application not run on computers with v4.0 even though the target platform is clearly getting set to v4.0.30319? Is this a known bug? Please comment for additional information and I will do my best to do so. Thanks!

LaneL
  • 737
  • 1
  • 6
  • 25
  • 2
    .NET 4.5 (and 4.6) use the same runtime version as .NET 4.0 (not the same *runtime* -- the same *version*), which explains "4.0.30319" -- getting the actual installed version is [much more involved](https://msdn.microsoft.com/library/hh925568). This doesn't address your problem, but at least explains part of it. The `/targetplatform` selection looks OK. – Jeroen Mostert Jun 08 '16 at 16:12
  • Was able to gain a bit of insight from the accepted answer here: http://stackoverflow.com/questions/13748055/could-not-load-type-system-runtime-compilerservices-extensionattribute-from-as – LaneL Jun 09 '16 at 15:15

0 Answers0