It will not be an easy task. However: The Dragon Book is probably a good place to start (assuming you have enough background information for a compiler theory book to make sense to you). Compiler Design: Principles and Practice is also good text.
You want to compile CIL (common intermediary language). This handy wiki article describes a set of CIL instructions. Debugging your middleware from the CLR ... well, where is the related StackOverflow article useful =)
This will cover your first two bullets (and consume a large chunk of your life).
The following two are different problems, but the easiest way to “do this” is probably to determine the syntax of an existing text editor and configure the macro in the program to call your compiler. I would recommend TextPad , although I'm sure that opinions about a general purpose custom text editor will vary among the community;)
Designing a complete IDE with all the features that you have learned and love in your environment can be quite a challenge ... or you can try creating an eclipse plugin. Personally (assuming you can design your language and learn something from it), I just stick with the syntax highlighting in TextPad.
source share