Cecil
Cecil is a library to inspect, modify and create .NET programs
Cecil has been around since 2004 and is widely used in the .NET community. If you're using Cecil, or depend on a framework, project, or product using it, please consider sponsoring Cecil. Cecil 0.10 beta 5 addresses a long standing issue: previously, a rewrite of native pdb files would lose some debugging information, including the list of namespaces that were used in methods (and thus breaking the expression evaluation) or the scopes in generators (for iterators or async methods).