I am trying to merge two dlls for crm 2016 online using Ilmerge option. In the log file I get this error.
"Unable to cast object of type 'System.Compiler.Method' to type 'System.Compiler.Field'."
I am using the following command
ilmerge /log:%lib%log.txt /targetplatform:v4,"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0". /wildcards /out:%lib%Merged.dll %lib%ClassLibrary1.dll %lib%external.dll /union /copyattrs /closed /zeroPeKind