使用 ILMerge 合并 dll
我正在尝试使用 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 /关闭/目标平台:v4, ”C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0″ /out:DataAccessMerged.dll Frameworks.dll ObservableDictionary.dll
OR
将宏甚至放置在TargetDir
等等......
它不起作用。 .net框架是4,我的vs是2010 sp1。
好吧,伙计们。我希望这对某人有帮助。 问题当然是frameworks 4,有几种方法可以解决这个问题。 我的方法是为ILMerge exe创建一个ILMerge.exe.config文件,并输入这个xml <代码> <配置> <启动useLegacyV2RuntimeActivationPolicy =“true”>
I am trying to merge some dlls into one merge dll using ILMerge.
i have tried several post build commands and nothing worked.
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
OR
placed the macros even of TargetDir
and so on....
it didnt work.
the .net frameworks is 4 my vs is 2010 sp1.
Well guys. I hope this help someone.
The problem is of course frameworks 4, there are several ways to solve this issue.
my way is to create a ILMerge.exe.config file to the ILMerge exe, and enter this xml
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/>
</startup>
</configuration>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ILMerge.exe 还具有 /targetplatform 命令行选项。
例如,
ILMerge.exe /targetplatform:v4
ILMerge.exe also has a /targetplatform command line option.
For example,
ILMerge.exe /targetplatform:v4