我正在尝试使用 ILMerge 将一些 dll 合并到一个合并 dll 中。我尝试了几个后期构建命令,但没有任何效果。
C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe /lib:C:\Windows\Microsoft.NET\Framework\v4.0.30319
/lib:”C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies”
/t:dll /closed /targetplatform:v4,
”C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0″ /out:DataAccessMerged.dll Frameworks.dll ObservableDictionary.dll
或者
甚至放置宏TargetDir
等等....
它没有用。.net 框架是 4 我的 vs 是 2010 sp1。
好吧,伙计们。我希望这对某人有所帮助。问题当然是框架 4,有几种方法可以解决这个问题。我的方法是为ILMerge exe创建一个ILMerge.exe.config文件,然后输入这个xml
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
</startup>
</configuration>