无法加载装配问题

编程入门 行业动态 更新时间:2024-10-24 00:28:04
本文介绍了无法加载装配问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我收到以下错误:

无法加载程序集。错误信息:System.BadImageFormatException:未能加载文件或程序集文件:...或它的某一个依赖。这个组件由一运行时间比当前加载运行时更新的构建并不能装载。

Cannot load assembly. Error details: System.BadImageFormatException: Could not load file or assembly 'file:...' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

该组件是建立与框架4.0和我确信,我的解决方案的所有项目也建有框架4.0。

This assembly is built with .Net Framework 4.0 and i made sure that all projects in my solution are also built with .Net Framework 4.0.

任何想法,为什么我得到的错误?我怎么能检查哪些框架装载有我的应用程序?

Any idea why i am getting the error? How can i check which frameworks are loaded with my application?

推荐答案

什么是主要的可执行文件,即负责决定的CLR的哪个版本的程序集加载?请注意,这不是正在修建的通过只是一个案件的.NET 4 - 如果你的可执行文件的目标的.NET 3.5或更低,这将在.NET 2.0 CLR加载,和您的.NET 4集将不会加载。

What is the main executable, i.e. the assembly responsible for deciding which version of the CLR is loaded? Note that it's not just a case of being built by .NET 4 - if your executable targets .NET 3.5 or lower, it will load in the .NET 2.0 CLR, and your .NET 4 assemblies won't load.

更多推荐

无法加载装配问题

本文发布于:2023-11-13 10:35:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584145.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!