我收到错误:“此程序集是由比当前加载的运行时更新的运行时构建的,无法加载。”
我有一个 .NET 2.0 项目调用的 .NET 4.0 dll 项目。有没有办法调和框架的差异?
最佳答案
I have a .NET 4.0 dll project that is being called by a .NET 2.0 project. Is there a way to reconcile the difference in framework?
不是那样的,不。 .NET 4 CLR 可以加载 .NET 2 程序集(通常 - 混合模式程序集有一些异常(exception),IIRC),但反之则不行。
您必须将 .NET 2 项目升级到 .NET 4,或者将 .NET 4 项目降级到 .NET 3.5(或更早版本)。
关于c# - "This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10607095/