无法加载装配问题 [英] Cannot load assembly problem

查看:124
本文介绍了无法加载装配问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误:

无法加载程序集。错误信息: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.

这篇关于无法加载装配问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆