I am trying to write an MSBuild task that lets me inline IL code into methods, similar to Glenn Slayden's answer to this question. I have written code to decompile and modify the IL, but I don't know how to recompile it.
No libraries that I have found, including Mono.Cecil, allows you to compile raw IL code from a single string. Glenn Slayden uses ILAsm, but I can't find ILAsm for .NET 5.
How do I compile raw IL code from a single string?