You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having it as an overload AddReference (or as example or a discussion of doing this in documentation) would be quite nice. Is it possible to delete the assembly in a temp dir after calling AddReference on it?
Kind of continuation to #2196 where I manage to compile some .cs files by calling Roslyn from Python using pythonnet, but still have to store the assembly on disk.
Also, the docs looking empty. I"m maybe looking in a wrong place?
The text was updated successfully, but these errors were encountered:
vadimkantorov
changed the title
[feature request] AddReference overload for loading an assembly from a bytes object
[feature request] AddReference overload for loading an assembly from a bytes object or a discussion of this in docs
Jul 20, 2023
It appears that one can delete the assembly after AddReference'ing it and still execute methods from this assembly. It would be cleaner to have AddReference from bytes, but this is cool too. Would be nice to have it mentioned in docs.
This exists in regular .NET https://learn.microsoft.com/en-us/dotnet/api/system.reflection.assembly.load?view=net-7.0#system-reflection-assembly-load(system-byte())
Having it as an overload AddReference (or as example or a discussion of doing this in documentation) would be quite nice. Is it possible to delete the assembly in a temp dir after calling
AddReference
on it?Kind of continuation to #2196 where I manage to compile some
.cs
files by calling Roslyn from Python using pythonnet, but still have to store the assembly on disk.Somewhat related on complete pipeline of using Roslyn + Assembly.Load: https://weblog.west-wind.com/posts/2022/Jun/07/Runtime-CSharp-Code-Compilation-Revisited-for-Roslyn - might be useful for other people looking to do this.
Also, the docs looking empty. I"m maybe looking in a wrong place?
The text was updated successfully, but these errors were encountered: