Is there a way to instruct c# compiler to output source at different stages of compilation: source after syntactic sugar removed, …, IL.
Perhaps some tools (Resharper?) do this, but I’d like to know how they do that.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No there is not. The C# compiler doesn’t produce any intermediate output. It either produces errors / warnings or an assembly.
Getting the IL can be done with ildasm. This is a tool that ships with .Net that will display the raw IL for assemblies