Do you know any good book about the workings of the CLR, the .NET Framework and CIL as opposed to any specific .NET language?
Although it mentions C# on the cover CLR via C# is a very good read to discover the ins and outs of the CLR.
Regardless of any other books, you will definitely need ECMA-335 standard for a detailed specification of CLR and CIL. With sufficient experience, it may actually be sufficient on its own.
Also, "Expert .NET 2.0 IL Assembler" looks like it matches your requirements, though I haven't read it and can't comment on its quality. Amazon description looks promising, though:
Topics include managed executable file structure, metadata table structure, Microsoft IL instructions, structured exception handling, managed and unmanaged code interoperation, executable file generation, and metadata manipulation API exposed by the common language runtime.
This is a little dated but this is the book I used to learn .NET back then. Still relevant today as most things expanded but not changed. Essential .NET, Volume I: The Common Language Runtime
I agree with Pavel. I've read a whole stack of these books and/or specs ... if you are just starting out here are the top 5 books/learning tools I would recommend:
Good for the CLI and fundamentals of the CIL
- Ecma 335 spec
- Serge Lidin's (APress Book) - Expert .NET 2.0 IL Assembler
- (optional and a little outdated) O'Rielly's Shard Source CLI Essentials with the PDF of the second edition's dreaft mentioned above).
Good for learning to program with CIL
- Jason Bock's (Apress Book) CIL Programming (this is .Net 1.1 and doesn't have generics but is good to build upon #1 and #2 - this book helps you with writing apps in IL)
- Reflector and ILDasm .... lots of looking at the code
Sharp Develop's IDE has a IL project type (VS doesn't) so if you want to write IL in an IDE instead of notepad you might want to check it out.