을 .NET 3.5을 병합 : AssemblyA 현재 프로젝트 출력을 $ (이다문제는 .NET 2.0 어셈블리
ILMerge version 2.13.307.0
Copyright (C) Microsoft Corporation 2004-2006. All rights reserved.
ILMerge /out:Assembly.dll AssemblyA.dll AssemblyB.dll /targetplatform:v2,C:\Windows\Microsoft.NET\Framework\v3.5 /log:log.txt
Set platform to 'v2', using directory 'C:\Windows\Microsoft.NET\Framework\v3.5' for mscorlib.dll
An exception occurred during merging:
Unable to cast object of type 'System.Compiler.Class' to type 'System.Compiler.Struct'.
at System.Compiler.SystemTypes.Initialize(Boolean doNotLockFile, Boolean getDebugInfo, PostAssemblyLoadProcessor postAssemblyLoad)
at ILMerging.ILMerge.Merge()
at ILMerging.ILMerge.Main(String[] args)
TargetFileName)이고 AssemblyB는 참조 된 어셈블리입니다.
- AssemblyA => V3.5
- AssemblyB => 2.0
이상한 것은은 내가 명령을 변경할 때 작동 .NET 4를 사용하는 것을 :
ILMerge /out:Assembly.dll AssemblyA.dll AssemblyB.dll /targetplatform:v4,C:\Windows\Microsoft.NET\Framework\v4.0.30319 /log:log.txt
병합 된 어셈블리가 3.5 버전이 아닌 4가되기를 원하기 때문에 이전 명령을 작동 시키려면 어떻게해야합니까? 아니면이 오류를 어떻게 해결합니까?
mscorlib, c : \ windows \ microsoft.net \ framework \ v2.0.50727에 적절한 디렉토리를 사용하십시오. .NET 3.5는 새로운 런타임 버전이 아닙니다. v4 명령 줄이 [위험한 잘못] (http://stackoverflow.com/a/13750130/17034)인지 확인하십시오. –
@HansPassant 주석 주셔서 감사합니다. 첫 번째 명령을 v3.5에서 2로 변경합니다 ... v4 명령 줄이 위험한 방식으로 잘못되었음을 알려주시겠습니까? – avantprime
@HansPassant 올바른 해결책을 제공 한 것으로 인정 받기를 원하는 경우 답변을 답변으로 게시하십시오. – avantprime