Run-time compilation with Roslyn - How to produce AoT compilation

423 views Asked by At

I have been exploring run-time dynamic code compilation using c# with Roslyn. Using this answer on SO I have been able to complete an example that does what I want with the exception of one thing: It produces a dll which must then be invoked with the dotnet command. I conclude from what I have googled thus far that it is possible to AoT with .NET 5 at this point and produce an .exe that is self contained. Based on CSharpCompilation could someone direct me to a good example of how to do this?

0

There are 0 answers