The task is, there is a C # code, you need to get its IL code. For this, I understand use ildasm.exe disassembler. Honestly, it doesn’t work out \ I don’t understand how to make a command to transfer some file containing C # code and get a file with IL code at the output.

ildasm MyFile.exe /output:MyFile.il 

The first parameter is the path to the exe, the second parameter / output: the path to the creation directory of MyFile.il. It does not work for me to pass the whole path to the directory in the parameter, or I didn’t understand it that way. In addition, I look at examples of uses, it is impossible to transfer the .cs file with the code, not the .exe.

  • You must compile your C # code, and feed the result to the ildasm utility. The ildasm utility does not compile C # for you in exe / dll. - VladD
  • Understood thanks. At first, as I understand it, I turn my code into a .dll, and throw it at the input of Ildasma. I 'll try - Sergey Ivanyuk
  • Exactly! You can create the idea and through CodeDOM, but you can run the stock compiler. - VladD

0