Closed ShadowMarker789 closed 1 year ago
As I understand it right, the assembly is loaded and can be used. So, it might be better to set assembly
instead of reflected
?
Can you check this?
Can you rebase the pull request?
Diff of the change is commited (abd0496641fe80ba1be6580a45ef15e90bcf3aae)
Modification to the routine in AssemblyCacheEnumerator::MoveNext to use Assembly.Load instead of Assembly.ReflectionOnlyLoad under .Net Core and .Net 5+ as Assembly.ReflectionOnlyLoad is not supported on those runtimes and is guaranteed to throw PlatformNotSupportedExceptions.
Exposing additional static property to permit the user to use UnsafeLoadFrom in Assembly loading should the user want to load assemblies faster. This option is off by default for safety reasons and to preserve earlier behaviour.
Under initial testing, UnsafeLoadFrom is ~10x faster and dropped load times in a built app from 5 seconds to 0.5 seconds.