Rewrite mod assembly loading
Pathoschild opened this issue ยท 4 comments
Done in develop
for the upcoming 1.8 release. The new implementation is much simpler, eliminates the .cache
folders by loading assemblies from memory, ensures DLLs are loaded in leaf-to-root order, has improved dependent assembly resolution, and reduces log verbosity. These changes should address a range of issues, notably #221 and #226.
Note: this will break any mods which use properties like Assembly.GetExecutingAssembly().Location
instead of the helpers provided by SMAPI (like helper.ReadConfig<T>()
or helper.DirectoryPath
).
This breaks the Visual Studio debugger as-is, probably because SMAPI no longer loads the assembly file from disk.
Fixed in develop
by only loading the assembly from memory if it was rewritten.