zoukankan      html  css  js  c++  java
  • 03把IL编译成可执行文件

    1、在记事本中编写IL代码如下:

    .assembly HelloWorld{}
    .assembly extern mscorlib{}
     
    .method public static void Main(string[] args) 
    {
        .entrypoint
        .maxstack 8
     
        ldstr "Hello,World"
        call void [mscorlib]System.Console::WriteLine(string)
        call valuetype [mscorlib]System.ConsoleKeyInfo [mscorlib]System.Console::ReadKey()
        pop
        ret
    }

    2、保存为MyFirstIL.il文件,位置在F:学习练习NET之美MyFirstIL.il

    3、开始→所有程序→Microsoft Visutal Studio 2012→Visual Stuio Tools→开发人员命令提示

    编译IL

    4、最终把MyFirstIL.il文件编译成了MyFirstIL.exe文件。
    最终

    ILASM的其它用法:
    ilasm new.il /output=test.exe /exe
    ilasm 源文件.il /output=目标文件.dll /dll

  • 相关阅读:
    Difference Between Performance Testing, Load Testing and Stress Testing
    什么是测试策略?
    性能测试和压力测试的区别
    测试工程师培训体系
    Java测试工具
    浅谈HTTP中Get与Post的区别
    Python 读书系列
    Automation- watin
    脚本语言&& Performance Testing
    HDFS分布式集群安装
  • 原文地址:https://www.cnblogs.com/darrenji/p/3595600.html
Copyright © 2011-2022 走看看