This latest error turns out to be a configuration issue on my side.
In order to work around the Security MethodAccessExceptions I was seeing earlier,
I had to put the following assembly attributes on all of the assemblies that called into
your code:
[assembly: SecurityRules(SecurityRuleSet.Level1)]
[assembly: AllowPartiallyTrustedCallersAttribute()]
Everything seems to be working now!