The task is that the contents of the dll file becomes known only during the execution of the main program, in which I get the necessary data and form a line or cs file. Then I need to create a dll from the code I wrote in the line (let's say it's correct and compiles without errors). Then I will dynamically connect this dll to the main program and use the function from there.
The main problem is in the dynamic creation of the dll file, I did not find a working option. I am working in WPF .NET 5.0, I tried CodeDOM but there was an error "not supported on this version" so I will be very grateful for any information on how to do it!