lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] Shazwazza commented on issue #305: Investigate how we can load external assemblies when running Lucene.Net.Benchmarks on the command line
Date Tue, 06 Oct 2020 14:40:41 GMT

Shazwazza commented on issue #305:

   oh yes my bad, i was confused with the benchmarkdotnet project(s) that we have, this one
is different.
   > Since the commands are essentially run-once I don't believe there will be any issues
with "unloading" to worry about.
   If its for netcore 3 then AssemblyLoadContext is still the way to do it whether you unload
or not. This is a nice post about it
If it's not netcore 3 then you can use Assembly.Load(name) if you want it loaded correctly
(with fusion) but then the assembly needs to be in your probing paths (i.e. /bin), else you
can load with Assembly.LoadFrom(filename) or Assembly.Load(bytes) but if you do that, the
assembly will not be loaded in the same context. This is all different depending on the platform
you are running on. In Net Framework this is all super ugly and you need to know about the
3 load contexts: Default, Load-From, No Context, see
but basically dealing with anything but the Default is a pain and you will almost always need
an AppDomain.AssemblyResolve event, but you might get success with LoadFrom
   netcore has fixed all this nonsense :) so depends on what it needs to run on

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:

View raw message