有人对 IlMerge 有此错误吗?我正在尝试使用 4.0 框架为 .NET 项目合并一些程序集。
ILMerge /log /lib:..\Libraries /targetplatform:v4 /internalize:..\SolutionFiles\CJCommon.exclude /ndebug /out:bin\Release\Common.dll obj\Release\Common.dll C:\Development\CJCommon \Libraries\FluentNHibernate.dll C:\Development\CJCommon\Libraries\HibernatingRhinos.Profiler.Appender.dll C:\Development\CJCommon\Libraries\Iesi.Collections.dll C:\Development\CJCommon\Libraries\log4net.dll C: \Development\CJCommon\Libraries\Microsoft.Practices.ServiceLocation.dll C:\Development\CJCommon\Libraries\NHibernate.ByteCode.Castle.dll C:\Development\CJCommon\Libraries\NHibernate.dll C:\Development\CJCommon\Libraries \NHibernate.Linq.dll C:\Development\CJCommon\Libraries\StructureMap.dll
将平台设置为“v4”,使用目录“C:\Windows\Microsoft.NET\Framework64\v2.0.50727..\v4.0.20107”作为 mscorlib.dll
合并时发生异常:
你调用的对象是空的。
at System.Compiler.CoreSystemTypes.GetSystemAssembly(Boolean doNotLockFile, Boolean getDebugInfo)
at System.Compiler.CoreSystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo)
at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo)
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
C:\Program Files (x86)\MSBuild\Ilmerge.CSharp.targets(8,5): error MSB3073: The command ""C:\Program Files (x86)\Microsoft\Ilmerge\Ilmerge.exe" /log /lib :"..\Libraries" /targetplatform:v4 /internalize:./.exited with code 1...
...
==========全部重建:3成功,1失败,0跳过==========