如何在GAC中删除旧版本的实体框架? [英] How do you remove old version of entity framework in GAC?

查看:56
本文介绍了如何在GAC中删除旧版本的实体框架?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天我发布了一个问题在Visual Studio上安装MVC 4之后有关实体框架版本的问题.

Yesterday I posted a question about a issue related to entity framework version after installing MVC 4 on visual studio.

即使我在参考新版本的dll时手动设置了它,Visual Studio仍会指向旧版本的dll(4.3.1.0)

Somehow visual studio is still pointing to the old version of the dll (4.3.1.0) eventhough I manualy set it in my reference to the new one

我尝试了danielovich建议的解决方案 gacutil/u"EntityFramework,Version = 4.3.1.0,Culture = neutral,PublicKeyToken = b77a5c561934e089"

I tried solution suggested by danielovich gacutil /u "EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

但找不到它

未找到与EntityFramework相匹配的程序集,版本= 4.3.1.0,区域性=中性,PublicKeyToken = b77a5c561934e089

如果我查看项目文件,可以看到:<参考Include ="EntityFramework,Version = 4.4.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089,processorArchitecture = MSIL">< HintPath> .. \ packages \ EntityFramework.5.0.0 \ lib \ net40 \ EntityFramework.dll</HintPath></Reference>

If I look in my project file I can see: <Reference Include="EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <HintPath>..\packages\EntityFramework.5.0.0\lib\net40\EntityFramework.dll</HintPath> </Reference>

我正在尝试使用哪个新版本.我想知道是否从其他地方引用了DLL.

Which is the new version I am trying to use. I wonder if the DLL is being referenced from somewhere else.

推荐答案

gacutil /u <fully qualified assembly name> 

尝试一下:

gacutil /u "EntityFramework, Version=4.3.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

EF 4. +并非旨在用于GAC,而是旨在进行bin部署.

EF 4.+ is not designed to be GAC'ed, it's designed to be bin deployed.

这篇关于如何在GAC中删除旧版本的实体框架?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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