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
Table D-3 shows some of the common uses of the assemblers.
Option |
Description |
---|---|
/debug |
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. |
/dll |
This option produces a .dll output. |
/exe |
This option produces an .exe output. |
/listing |
This option produces a listing of the output on STDOUT. |
/output=filename |
filename is the output filename. |
/? |
This option is used to obtain command-line help. |