MSIL Assembler (ilasm.exe)

This tool takes MSIL as input and generates a portable executable (PE) file containing the MSIL and the metadata required to run on the .NET Framework. This is most useful to vendors who would like to create MSIL-compliant compilers. All they have to do is write the compiler to translate the source language to MSIL. Ilsam.exe will take the second step to put the MSIL content into the PE format where it can be executed on the .NET Framework. The general syntax for MSIL assembler is:

ilasm [options] MSILfilename

The following table shows some of the common usages of the assemblers:




This option ensures that the output PE contains debugging information such as local variables, argument names, and line numbers. This is useful for debug build.


This option produces a .dll output.


This option produces an .exe output.


This option produces a listing of the output on STDOUT.


filename is the output filename.


This option is used to obtain command-line help.

Get .Net Framework Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.