Force Direct Loading on dependent dlls

It looks like in Grasshopper 6.0, the dlls (which a gha depends on) are now loaded using pre-loading into byte arrays. Is there a way to force them to be directly loaded as in Grasshopper 0.9? Thanks :slight_smile:

Ideally you’d never need to load assemblies via the memory. However you can specify per GHA which method you prefer through the Grasshopper Preferences (Solver section). This setting never applies to additional referenced assemblies though, they are always loaded by the .NET framework on demand, and they are always loaded straight off the disk.

Ah yes. I was mixed up. I asked because I was surprised to find out that the KangarooSolver.dll (which Kangaroo2.gha depends on) was NOT locked while Grasshopper is running.

Turned out that this KangarooSolver.dll is the one in the Libraries folder, which is actually NOT used/loaded by Rhino 6. Rhino 6 uses separate KangarooSolver.dll in the main program files directory

Because we are on this topic, may I ask: The reason Grasshopper offers the byte-array load-option to make rebuild-reload-run process of gha development more convenient? or is there another major reason?

Mostly it was so people could install plug-ins on network drives that are treated as untrusted by Windows. Dlls won’t load from untrusted volumes but if you put them in memory first it does work.

There were also reports of some dlls not loading at all without going through memory first. In the end though, I don’t think the added complexity was worth it. We should have just loaded dlls the way nature intended, and deal with any snags by fixing them rather than circumventing them.