Closed gabriel-samfira closed 3 months ago
CC @splatteredbits
I took your advice and went with LloadFile()
in the end. Dependency resolution rules are such a mess. On .Net Framework, LoadFile()
seems to have automatic resolution. In fact, registering a handler for the AssemblyResolve()
event on Windows Server 2016, breaks when running inside a Start-Job
script block.
On dotnet core however, this handler is absolutely needed.
Let me know if you have any thoughts on this PR or if you see anything really funky.
merging this. Will revert before release if it turns out to be a bad idea.
LoadFile() works on both dotnet Framework 47 and dotnet Core. The downside is that we need to manually resolve dependencies for the custom serializer assembly on dotnet Core. On dotnet Framework there seems to be different behavior in terms of assembly resolution, and as long as the required assembly is in the same folder as the requesting assembly, it loads fine.