您的位置:首页 > 编程语言 > C#

C#加壳(ILMerge)

2016-07-06 13:17 567 查看

1.合并

    1).首先下载这个工具:ilmerge http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=17630
   2).安装。
   3)具体操作:首先我的ILMerge安装到啦C盘的路径为:C:\Program
Files (x86)\Microsoft\ILMerge

   如图:



    1、cd C:\Program Files (x86)\Microsoft\ILMerge

    2、C:\Program Files (x86)\Microsoft\ILMerge>ILMerge /ndebug /target:winexe /targetplatform:4
 /out:F:\医疗导视服务     端.exe /log F:\Debug\20160617_hand.exe  F:\Debug\AxInterop.WMPLib.dll F:\Debug\Interop.WMPLib.dll

    F:\Debug\_Microsoft.VisualBasic.dll

    3、其中:/log:log.txt命令是将生成过程中的日志,写入到log.txt文件中。out:F:\医疗导视服务端.exe是输出文件。       F:\Debug\20160617_hand.exe
 F:\Debug\AxInterop.WMPLib.dll F:\Debug\Interop.WMPLib.dll是源文件,多个源文件用空格隔。

  /targetplatform:4:注意用最新版本,不然会报错。

  报错如下:

  System.InvalidOperationException:
Unresolved assembly reference not allowed: System.Core.
       在 System.Compiler.Ir2md.GetAssemblyRefIndex(AssemblyNode assembly)
       在 System.Compiler.Ir2md.GetTypeRefIndex(TypeNode type)
       在 System.Compiler.Ir2md.VisitReferencedType(TypeNode type)
       在 System.Compiler.Ir2md.GetMemberRefIndex(Member m)
       在 System.Compiler.Ir2md.GetMethodToken(Method m)
       在 System.Compiler.Ir2md.VisitMethodCall(MethodCall call)
       在 System.Compiler.Ir2md.Visit(Node node)
       在 System.Compiler.Ir2md.VisitMethodCall(MethodCall call)
       ..........


2.加壳

        1.下载SixxPack
        2.加壳
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: