“Could not load file or assembly 'System.Core, Version=2.0.5.0,…” exception when loading Portable Class Library dynamically

前端 未结 3 1644
北海茫月
北海茫月 2021-01-04 08:00

First of all I need to emphasize that this is slightly different question than the one in this thread. Additionally, installing KB2468871 doesn\'t help.

I tried to s

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 08:38

    You can return the System.Core assembly of your platform (e.g. version 4.0.0.0 for .NET Framework 4.0) from the AssemblyResolve event, when asked for the 2.0.5.0 version.

    I am loading all my referenced assemblies stored as resources via Load(byte[]), which also fails to resolve the 2.0.5.0 assembly, and I retrieve both System and System.Core from AppDomain.CurrentDomain.GetAssemblies().

提交回复
热议问题