简体   繁体   English

如何检查GAC中是否存在程序集引用?

[英]How do I check if an assembly reference exists in the GAC?

My EntityFramework reference has a yellow triangle warning left of it, and my project says it's missing. 我的EntityFramework参考左侧有一个黄色三角形警告,而我的项目则说它丢失了。

Could not resolve this reference. 无法解决此参考。 Could not locate the assembly "EntityFramework, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL". 无法找到程序集“ EntityFramework,版本= 4.1.0.0,区域性=中性,PublicKeyToken = b77a5c561934e089,processorArchitecture = MSIL”。 Check to make sure the assembly exists on disk. 检查以确保程序集在磁盘上。 If this reference is required by your code, you may get compilation errors. 如果您的代码需要此引用,则可能会出现编译错误。

How do I resolve this problem? 我该如何解决这个问题?

The GAC path is C:\\Windows\\assembly . GAC路径为C:\\Windows\\assembly

However, you resolve your error, you must use NuGet to install the EntityFramework package (or do it manually but that's harder and doesn't allow you to upgrade). 但是,您要解决错误,必须使用NuGet来安装EntityFramework软件包(或手动进行安装,但这比较困难并且不允许您进行升级)。

  1. Install NuGet if you haven't already 如果尚未安装NuGet
  2. Right click on your project and "Manage NuGet packages" 右键单击您的项目,然后单击“管理NuGet程序包”
  3. Search for EntityFramework 搜索EntityFramework
  4. Install 安装

Later, you can use the same dialog under "Updates" to install updated versions of the EntityFramework. 以后,您可以在“更新”下使用相同的对话框来安装EntityFramework的更新版本。

In the case that you need to install 4.1.0.0 in particular because a third-party lib is using it and won't work with anything higher, install the appropriate package version from here . 如果您特别需要安装4.1.0.0,因为第三方库正在使用它,并且无法使用更高版本,请从此处安装适当的软件包版本。

Run the installer. 运行安装程序。

http://www.microsoft.com/en-au/download/details.aspx?id=8363 http://www.microsoft.com/en-au/download/details.aspx?id=8363

I had the same issue. 我遇到过同样的问题。 Its fixed now. 现在修复。 The entity framework dll was missing from the GAC, its present after running the installer. 运行安装程序后,GAC中缺少实体框架dll。

(You can verify the dll is missing from the GAC by opening the GAC c:\\windows\\assembly and seeing if it is listed.) (您可以通过打开GAC c:\\ windows \\ assembly并查看其是否已列出来验证GAC中缺少该dll。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM