Can Roslyn compile C # to CIL
Can the Roslyn C # compiler be used to compile C # human readable CIL code? Like the examples given here: https://en.wikipedia.org/wiki/Common_Intermediate_Language
I know it can generate bytecode in EXE / DLL form, but I am interested in CIL code.
Either from the command line or from the API.
I know the disassembler can be used in bytecode files, but I would prefer a more direct approach.
Thank.
+3
source to share
2 answers
C # will automatically compile to CIL. This is the target plate. (* Not sure about .NET Native / UWP).
Since it seems to me that your goal is to show the generated CIL code, have a look at Msiler :
If you happen to use Resharper, IL-Viewer is included .
0
source to share