我现在正在与AssenblyResolve活动挣扎一段时间.我搜索了stackoverflow并做了其他谷歌搜索,并尝试了所有我认为相关的.以下链接更接近我的问题(在我看来):
我有一个带有静态方法的Bootstrapper类(我将删除我们拥有的线程安全代码,只是为了清楚起见:
public static void Initialize()
{
AppDomain.CurrentDomain.AssemblyResolve += CustomResolve;
}
private static Assembly CustomResolve(object sender, ResolveEventArgs args)
{
// There is a lot code here but basicall what it does.
// Is determining which architecture the computer is running on and
// extract the correct embedded dll (x86 or x64). The code was based
// on milang on GitHub (https://github.com/milang/P4.net). And it's the same
// purpose we want to be able to load the x86 or x64 …Run Code Online (Sandbox Code Playgroud)