【发布时间】:2020-07-25 09:26:18
【问题描述】:
我正在编写一个复杂的应用程序,该应用程序利用 CodeDom 通过反射来实例化对象。然而,它在 netstandard2.0(也支持 net461 的包装器)和 net461 项目之间混合使用。
正如我所读到的,很有可能参考以前版本的框架,这种情况如下:
{System.TypeLoadException: Could not resolve type with token 01000067 from typeref (expected class 'System.CodeDom.Compiler.CompilerParameters' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
忽略为 Xamarin Mac 可执行文件加载到内存中的系统引用。
不适合的是寻找可能被 Xamarin 系统程序集覆盖的系统程序集的代码。
您知道任何解决方法吗?除了将剩余的一组项目完全迁移到 netstandard2.0 和 net461 之间的混合。
谢谢。
【问题讨论】:
标签: c# macos xamarin codedom xamarin.mac