Open MoreDone opened 7 months ago
Roslyn scripting would create a assembly everytime that cannot be unloaded when you run script, It can results memory leak also. You can see 41722.
This problem exists for a long time, I don't know why Microsoft doesn't intend to fix it. I use Roslyn scripting to implement flow execution in a RPA project, And I am trying to solve it now.
Version Used:
roslyn 4.8.0 runtime net8.0
Steps to Reproduce:
part of code of load hotfix plugin :
part of code of initialize interactive:
There is the whole project Demo.zip
Expected Behavior: What I want to do is, invoke same methods of assemblies which is dynamic load and later unload or reload if I modify some code, directly just like coding script. I use AssemblyLoadContext to create collectible assemblies, so that the old assemblies can unload to avoid memory leak. There are some command, quit or Quit() will stop app, reload or Reload() will reload plugin assemblies, and in hotfix project can add any custom function or class for invoking in console directory.
Actual Behavior:
My Demand: