0

I added an assembly into GAC ,and it is not present in windows/Assembly instead it is present in C:\Windows\Microsoft.NET\assembly\GAC_MSIL. But after I add reference of this assembly it is showing error message like Could not load file or assembly 'Microsoft.ApplicationBlocks.Data, Version=3.0.0.0, Culture=neutral, PublicKeyToken=76d09afd81300b1a' or one of its dependencies. The system cannot find the file specified. Any solution for this.

Joms
  • 31
  • 2
  • Have you set the reference to "Copy to Local" in your csproj? Is the version 3.0.0.0 the version referenced? I'd rather bundle the dependency with you application. – Oliver Nov 25 '14 at 08:34

1 Answers1

0

.NET before 4.0 uses c:\windows\assembly as the GAC folder. Starting with 4.0, it uses c:\windows\Microsoft.NET\assembly (because there was a runtime incompatibility change between versions). If you use a .NET 4+ tool to install your assembly, it goes to the second GAC, and if you try to reference it from a pre-.NET 4 project, it will look in the first GAC and won't find it. See https://stackoverflow.com/a/2660366/552139

Community
  • 1
  • 1
fejesjoco
  • 11,763
  • 3
  • 35
  • 65