I want to know why ILMerge commands don't go through.

Asked 2 years ago, Updated 2 years ago, 316 views

Regarding the presentation code, I would like to know the reason why ILMerge.exe's command does not go through.
Object reference is not configured on the object instance. What does mean?I entered the command with reference to the reference site, but the following error was displayed and .dll could not be included in .exe.

Tried the commands A and B as follows:
LIMerge.exe file you want to include
I tried various things like this.

Reference Site:
https://qiita.com/mkit0031/items/5edde5926217a11aca85
https://atmarkit.itmedia.co.jp/fdotnet/dotnettips/426ilmerge/ilmerge.html

""C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe"/ndebug/targetplatform:v4/ndebug/wildcards/out:piyo.exe C:\Users\xxxx\Desktop\HEIC_SimpleConverter\HEIC_SimpleConverter\buster\HEIMER.EX\HEverSelector.EX\HE.
C:\Users\xxx>"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe"/ndebug/targetplatform:v4/ndebug/wildcards/out:piyo.exe C:\Users\xxxx\Desktop\HEIC_SimpleConverter_HEIMERIC\HEPL\HECS\HECS\HECS\HECS\HEPL\HEX\HETERECase\HE.
An exception occurred during merge:
Object reference is not configured for the object instance.
   Location: System.Compiler.CoreSystemTypes.GetSystemAssembly (Boolean doNotLockFile, Boolean getDebugInfo)
   Location: System.Compiler.CoreSystemTypes.Initialize (Boolean doNotLockFile, Boolean getDebugInfo)
   Location: System.Compiler.SystemTypes.Initialize (Boolean doNotLockFile, Boolean getDebugInfo)
   Location ILMerging.ILMerge.Merge()
   Location ILMerging.ILMerge.Main (String[]args)
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe"/ndebug/targetplatform:"C:\Program Files\Reference Assembly\Microsoft\Framework\v3.5"/ndebug/wildcards/out:piyo.exe\HEXICs\HEX\HEXICers\HEX\HEX\HEX\HEX\HEXICs
C:\Users\xxxx>"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe"/ndebug/targetplatform:"C:\Program Files\ReferenceAssemblies\Microsoft\Framework\v3.5"/ndebug/wildcard\HEXoppers:HEXoppers:
An exception occurred during merge:
Platform 'C:\Program Files\Reference Assembly\Microsoft\Framework\v3.5' not recognized.
   Location ILMerging.ILMerge.SetTargetPlatform(String platform, String dir)
   Location ILMerging.ILMerge.Merge()
   Location ILMerging.ILMerge.Main (String[]args)

c# net net-core

2022-11-07 00:17

1 Answers

ILMerge is targeted at the .NET Framework, but the code in the question appears to be .NET 6.0, so it is not covered.

Apart from that, as far as the questions in the separate thread are concerned, I think you are using ImageMagic, but it contains the native code, so you cannot merge any way.Even if the extension is .DLL, ILMerge et al. will still be targeting .NET Assembly, but not native DLLs used by ImageMagic et al.


2022-11-07 06:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.