简体   繁体   中英

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.

Could not resolve this reference. Could not locate the assembly "EntityFramework, Version=4.1.0.0, Culture=neutral, 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 .

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).

  1. Install NuGet if you haven't already
  2. Right click on your project and "Manage NuGet packages"
  3. Search for EntityFramework
  4. Install

Later, you can use the same dialog under "Updates" to install updated versions of the 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 .

Run the installer.

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.

(You can verify the dll is missing from the GAC by opening the GAC c:\\windows\\assembly and seeing if it is listed.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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