错误加载的EntityFramework 4.3.1 [英] Error loading EntityFramework 4.3.1

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

问题描述

我创建了C#MVC应用程序。我创建了我的解决方案的新项目称为PhoneDomain。这样做的目的是从实际的问题分开我的数据和域层。我右键点击该项目,并赴添加库包参考和我试图加入的EntityFramework包(版本4.3.1)。它说,操作失败此包包含一个init.ps1文件,需要从Package Manager控制台

I created an MVC application in C#. I created a new project in my solution called PhoneDomain. The purpose of this is to separate my data and domain layer from the actual problem. I right clicked on the project and went to "Add Library Package Reference" and I attempted to add the EntityFramework package (version 4.3.1). It said "Operation Failed" "This package contains an init.ps1 file and needs to be installed from the Package Manager Console".

所以我在Visual Studio中打开包管理器控制台和类型以下到控制台窗口:
安装包的EntityFramework -project PhoneDomain

So I opened the Package Manager Console in Visual Studio and typed the following into the console window: install-package EntityFramework -project PhoneDomain

几秒钟后,安装软件包,说成功添加的EntityFramework 4.3.1来PhoneDomain

After a couple seconds, it installed the package and said Successfully added 'EntityFramework 4.3.1' to PhoneDomain

问题是,当我运行我的应用程序,我得到了以下错误消息:无法加载文件或程序集的EntityFramework,版本4.3.1.0 =文化=中性或它的一个依赖。该系统找不到指定的文件。

The problem is, when I run my application, I get the following error message: Could not load file or assembly 'EntityFramework, Version=4.3.1.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified.

在PhoneDomain的参考是肯定存在的,在复制本地属性设置为

The reference in the PhoneDomain is definately there and the the Copy Local property is set to True.

谁能告诉我是怎么回事呢?

Can anyone tell me what is going on here?

推荐答案

检查你的web.config装配引用。有可能是在那里流氓参考。

Check your web.config for assembly references. There may be a rogue reference in there.

更新:
另外,还要确保所有项目都具备必要的参考...

UPDATE: Also make sure ALL projects have the necessary reference...

这篇关于错误加载的EntityFramework 4.3.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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