Questions tagged [global-assembly-cache]

The global assembly cache is a .NET machine-wide code cache that stores assemblies designated to be shared by multiple applications.

More information about the global assembly cache (or GAC) can be found in the MSDN documentation: Global Assembly Cache.

There are two methods for deploying assemblies to the GAC:

  • Though an installer designed to work with GAC
  • Through the gacutil.exe utility from the Windows SDK

GAC assemblies are stored in the following directories on Windows:

  • .NET 4 and up: %windir%\Microsoft.NET\assembly
  • Prior versions of .NET: %windir%\assembly
56 questions
23
votes
1 answer

Newtonsoft Json.NET version incompatibility (DLL hell)

Newtonsoft.Json release incompatible versions with same strong name, only changing the File version. According to MSDN: Assemblies that have the same strong name should be identical. Because of this our application breaks if other applications,…
16
votes
2 answers

How to programmatically determine if .NET assembly is installed in GAC?

What's the easiest way to check programmatically if an assembly is registered in the GAC (Global Assembly Cache) on the local machine? Is there some easy to use .NET API where I can give it a location to an assembly DLL or an Assembly object itself…
Scott Lerch
  • 2,620
  • 1
  • 23
  • 34
11
votes
1 answer

VS 2015 copies to output GAC references of a project reference regardless of copy local setting

I've raised a connect issue for that behavior. VS 2015 copies to output GAC references of a project reference regardless of copy local setting. VS 2010 doesn't do that with the same solution & projects, respecting the copy local property. The only…
vezenkov
  • 4,009
  • 1
  • 26
  • 27
10
votes
2 answers

Methods to programmatically install a .NET assembly into the GAC

I need to create a small app or script to install a .NET assembly into the GAC. I've read there are a couple ways to do this including: using gacutil.exe executing the following line of code: new…
Ken
  • 1,830
  • 3
  • 20
  • 32
9
votes
4 answers

The application requires the assembly ... to be installed in global assembly cache

I have created an window application using C#. I am publishing the application which is successful. When I am trying to install the application it is showing the below error. I am seen some solution which is about setting the project which…
शेखर
  • 17,412
  • 13
  • 61
  • 117
7
votes
2 answers

Is there any tool for GAC management?

Is there any GUI to view, add, delete assemblies in Global Assembly Cache?
pencilCake
  • 51,323
  • 85
  • 226
  • 363
7
votes
3 answers

How do I manually copy assemblies into the GAC?

I'm using Windows 7 Ultimate, trying to manually copy a file into the GAC. I tried using Windows Explorer but it promptly tells me "Access is denied". I tried using the command line with elevated permissions and it says the file was copied but I…
DenaliHardtail
  • 27,362
  • 56
  • 154
  • 233
6
votes
5 answers

Referencing the Global Assembly Cache

I have a project which needs to use NHibernate to communicate with my Oracle database. Many projects at my workplace use NHibernate, so the NHibernate assembly was placed in the Global Assembly Cache, a tool that I do not entirely understand. From…
Kevin
  • 74,910
  • 12
  • 133
  • 166
5
votes
1 answer

What's the purpose of the Global Assembly Cache (GAC)?

I have registered a DLL in the GAC. I can see the DLL in the path: c:\windows\asssembly; I suppose this means the DLL registerd correctly. However, if i have to use the DLL in my application, I still need to click "Add Reference" and add from the…
happysmile
  • 7,537
  • 36
  • 105
  • 181
5
votes
2 answers

GAC installation on every build - how to do it reliably

I would like to reliably auto-install my application assemblies in the GAC when I compile my application using Visual Studio. I've setup pre- and post-build events in my web application's build. Pre build event: "C:\Program Files (x86)\Microsoft…
Robert Koritnik
  • 103,639
  • 52
  • 277
  • 404
5
votes
4 answers

Failed to load receiver assembly - FileNotFoundException

Struggling with this, project builds and deploys when I don't have EventReceivers in my Features, and fails when I do. I'm not entirely sure which file the FileNotFoundException is referring to Error given in visual studio Error 1 Error occurred…
Colin Steel
  • 1,045
  • 1
  • 11
  • 24
5
votes
5 answers

Microsoft Office Interop Assembly references

I have an application developed in Visual Studio 2005 which I am deploying using ClickOnce. My solution contains two projects - a user interface layer coded in VB, and a class library coded in C#. My C# class library has some code that uses the…
4
votes
1 answer

How to tell which application(s) have a given assembly registered in the GAC?

When trying to remove a given assembly (log4net.dll in this case, but it should apply to any similar case) using gacutil.exe, the action fails due to the assembly being required by an application. However, I can't figure out how to tell which…
James Manning
  • 13,429
  • 2
  • 40
  • 64
4
votes
2 answers

Define a .net reference to always use the latest version of a GAC'd dll?

We have a vendor who is writing an application for us who makes use of a dll I've provided to them. My boss just found out that if we ever need to make a change to one of our dll's we'd have to provide the updated version to the vendor so they…
Lee Warner
  • 2,543
  • 4
  • 30
  • 45
4
votes
1 answer

Minor version difference in gacutil and environment causing major headaches

Here's the situation: I have a DLL compiled in .NET 2 that goes in the global assembly cache. I have the myDLL.dll.config file which reads:
CurtisHx
  • 746
  • 3
  • 11
  • 30
1
2 3 4