Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

failed to merge dll with /union option #93

Open
liesauer opened this issue Sep 16, 2020 · 0 comments
Open

failed to merge dll with /union option #93

liesauer opened this issue Sep 16, 2020 · 0 comments

Comments

@liesauer
Copy link

i am trying to merge my mod into game assembly, but failed.

ILMerge.exe /union /out:a.dll Assembly-CSharp.dll HumanMod.dll

my assemblies
assemblies.zip

log

=============================================
Timestamp (UTC): 2020/9/16 14:46:29
ILMerge version 3.0.0.0
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /log:a.log /copyattrs /allowMultiple /union /out:a.dll Assembly-CSharp.dll HumanMod.dll 
Set platform to 'v4', using directory 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\..\v4.0.30319' for mscorlib.dll
Running on Microsoft (R) .NET Framework v4.0.30319
mscorlib.dll version = 4.0.0.0
The list of input assemblies is:
	Assembly-CSharp.dll
	HumanMod.dll
Trying to read assembly from the file 'D:\Program Files (x86)\Microsoft\ILMerge\Assembly-CSharp.dll'.
Can not find PDB file. Debug info will not be available for assembly 'Assembly-CSharp.dll'.
	Successfully read in assembly.
	There were no errors reported in Assembly-CSharp's metadata.
Trying to read assembly from the file 'D:\Program Files (x86)\Microsoft\ILMerge\HumanMod.dll'.
Can not find PDB file. Debug info will not be available for assembly 'HumanMod.dll'.
	Successfully read in assembly.
	There were no errors reported in HumanMod's metadata.
Checking to see that all of the input assemblies have a compatible PeKind.
	Assembly-CSharp.PeKind = ILonly
	HumanMod.PeKind = ILonly
All input assemblies have a compatible PeKind value.
Merging assembly-level attributes from input assemblies for the target assembly.
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'System.Core'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'System.Core'.
Resolved assembly reference 'System.Core' to 'D:\Program Files (x86)\Microsoft\ILMerge\System.Core.dll'. (Used referencing Module's directory.)
Merging assembly 'Assembly-CSharp' into target assembly.
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.PhysicsModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.PhysicsModule'.
Resolved assembly reference 'UnityEngine.PhysicsModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.PhysicsModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.CoreModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.CoreModule'.
Resolved assembly reference 'UnityEngine.CoreModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.CoreModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'HumanAPI'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'HumanAPI'.
Resolved assembly reference 'HumanAPI' to 'D:\Program Files (x86)\Microsoft\ILMerge\HumanAPI.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.AudioModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.AudioModule'.
Resolved assembly reference 'UnityEngine.AudioModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.AudioModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.TextRenderingModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.TextRenderingModule'.
Resolved assembly reference 'UnityEngine.TextRenderingModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.TextRenderingModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.IMGUIModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.IMGUIModule'.
Resolved assembly reference 'UnityEngine.IMGUIModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.IMGUIModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.ParticleSystemModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.ParticleSystemModule'.
Resolved assembly reference 'UnityEngine.ParticleSystemModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.ParticleSystemModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.UI'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.UI'.
Resolved assembly reference 'UnityEngine.UI' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.UI.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'ProBuilderCore-Unity5'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'ProBuilderCore-Unity5'.
Resolved assembly reference 'ProBuilderCore-Unity5' to 'D:\Program Files (x86)\Microsoft\ILMerge\ProBuilderCore-Unity5.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'Assembly-CSharp-firstpass'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'Assembly-CSharp-firstpass'.
Resolved assembly reference 'Assembly-CSharp-firstpass' to 'D:\Program Files (x86)\Microsoft\ILMerge\Assembly-CSharp-firstpass.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.UIModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.UIModule'.
Resolved assembly reference 'UnityEngine.UIModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.UIModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.VideoModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.VideoModule'.
Resolved assembly reference 'UnityEngine.VideoModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.VideoModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.AnimationModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.AnimationModule'.
Resolved assembly reference 'UnityEngine.AnimationModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.AnimationModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.VRModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.VRModule'.
Resolved assembly reference 'UnityEngine.VRModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.VRModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'ProBuilderMeshOps-Unity5'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'ProBuilderMeshOps-Unity5'.
Resolved assembly reference 'ProBuilderMeshOps-Unity5' to 'D:\Program Files (x86)\Microsoft\ILMerge\ProBuilderMeshOps-Unity5.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.UnityAnalyticsModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.UnityAnalyticsModule'.
Resolved assembly reference 'UnityEngine.UnityAnalyticsModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.UnityAnalyticsModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.JSONSerializeModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.JSONSerializeModule'.
Resolved assembly reference 'UnityEngine.JSONSerializeModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.JSONSerializeModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.ImageConversionModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.ImageConversionModule'.
Resolved assembly reference 'UnityEngine.ImageConversionModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.ImageConversionModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.UnityWebRequestWWWModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.UnityWebRequestWWWModule'.
Resolved assembly reference 'UnityEngine.UnityWebRequestWWWModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.UnityWebRequestWWWModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.UNETModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.UNETModule'.
Resolved assembly reference 'UnityEngine.UNETModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.UNETModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'Assembly-CSharp' is referencing assembly 'UnityEngine.ScreenCaptureModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.ScreenCaptureModule'.
Resolved assembly reference 'UnityEngine.ScreenCaptureModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.ScreenCaptureModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'UnityEngine.UI' is referencing assembly 'UnityEngine'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine'.
Resolved assembly reference 'UnityEngine' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.dll'. (Used referencing Module's directory.)
Merging assembly 'HumanMod' into target assembly.
AssemblyResolver: Assembly 'UnityEngine.CoreModule' is referencing assembly 'UnityEngine.SharedInternalsModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.SharedInternalsModule'.
Resolved assembly reference 'UnityEngine.SharedInternalsModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.SharedInternalsModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'HumanMod' is referencing assembly 'Assembly-CSharp'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'Assembly-CSharp'.
Resolved assembly reference 'Assembly-CSharp' to 'D:\Program Files (x86)\Microsoft\ILMerge\Assembly-CSharp.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'UnityEngine' is referencing assembly 'UnityEngine.Physics2DModule'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'UnityEngine.Physics2DModule'.
Resolved assembly reference 'UnityEngine.Physics2DModule' to 'D:\Program Files (x86)\Microsoft\ILMerge\UnityEngine.Physics2DModule.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'System.Xml' is referencing assembly 'System.Configuration'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'System.Configuration'.
Resolved assembly reference 'System.Configuration' to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Configuration.dll'. (Used referencing Module's directory.)
AssemblyResolver: Assembly 'System.Xml' is referencing assembly 'System.Data.SqlXml'.
	AssemblyResolver: Attempting referencing assembly's directory.
Can not find PDB file. Debug info will not be available for assembly 'System.Data.SqlXml'.
Resolved assembly reference 'System.Data.SqlXml' to 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Data.SqlXml.dll'. (Used referencing Module's directory.)
Copying 1 Win32 Resources from assembly 'Assembly-CSharp' into target assembly.
	There were no errors reported in the target assembly's metadata.
ILMerge: Writing target assembly 'a.dll'.
An exception occurred during merging:
无法将类型为“System.Compiler.Field”的对象强制转换为类型“System.Compiler.Method”。
   在 System.Compiler.Ir2md.VisitMethodCall(MethodCall call)
   在 System.Compiler.Ir2md.Visit(Node node)
   在 System.Compiler.Ir2md.VisitExpressionStatement(ExpressionStatement statement)
   在 System.Compiler.Ir2md.Visit(Node node)
   在 System.Compiler.Ir2md.VisitBlock(Block block)
   在 System.Compiler.Ir2md.Visit(Node node)
   在 System.Compiler.Ir2md.VisitBlock(Block block)
   在 System.Compiler.Ir2md.VisitMethodBody(Method method)
   在 System.Compiler.Ir2md.VisitMethod(Method method)
   在 System.Compiler.Ir2md.Visit(Node node)
   在 System.Compiler.Ir2md.VisitClass(Class Class)
   在 System.Compiler.Ir2md.Visit(Node node)
   在 System.Compiler.Ir2md.VisitModule(Module module)
   在 System.Compiler.Ir2md.SetupMetadataWriter(String debugSymbolsLocation)
   在 System.Compiler.Ir2md.WritePE(Module module, String debugSymbolsLocation, BinaryWriter writer)
   在 System.Compiler.Writer.WritePE(String location, Boolean writeDebugSymbols, Module module, Boolean delaySign, String keyFileName, String keyName)
   在 System.Compiler.Writer.WritePE(CompilerParameters compilerParameters, Module module)
   在 System.Compiler.Module.WriteModule(String location, CompilerParameters options)
   在 ILMerging.ILMerge.Merge()
   在 ILMerging.ILMerge.Main(String[] args)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant