You’ll want to take a look at the Microsoft Research Common Compiler Infrastructure (CCI) project. It provides everything you need to generate the metadata and the MSIL for an assembly. And the debugging .pdb file, rather important to get your language going.
There’s a sister project, CCI Code Model and AST, that might be useful as well, depends how far along you got.