小编Fra*_*s P的帖子

AssemblyResolve没有为依赖项触发

我现在正在与AssenblyResolve活动挣扎一段时间.我搜索了stackoverflow并做了其他谷歌搜索,并尝试了所有我认为相关的.以下链接更接近我的问题(在我看来):

  1. 未调用AssemblyResolve,并且在序列化期间抛出FileNotFoundException

  2. 在类库中处理AssemblyResolve事件的位置?

我有一个带有静态方法的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)

c# assemblyresolve

16
推荐指数
2
解决办法
7162
查看次数

标签 统计

assemblyresolve ×1

c# ×1