Adding a DLL to the GAC in .NET 4.0

GACUTIL.EXE is no longer supplied/installed along with Visual Studio, instead, it has been moved into the Windows SDK v7.1.   So to install a DLL into the GAC for .NET 4.0 (or anything after v1.1 I believe) you must first download and install the SDK.  Once you have done this you must locate the relevant version of GACUTIL from the four possible locations:

  • Program FilesMicrosoft SDKsWindowsv7.1Bin
  • Program FilesMicrosoft SDKsWindowsv7.1Binx64
  • Program FilesMicrosoft SDKsWindowsv7.1BinNETFX 4.0 Tools
  • Program FilesMicrosoft SDKsWindowsv7.1BinNETFX 4.0 Toolsx64

The first two are for registering DLLs to be used in .NET 3.5 or earlier, with the first being for x86 and the second for x64 versions.

The second two are for registering DLLs to be used in .NET 4.0, again with the first being for x86 and the second for x64 versions.

With the release of .NET 4.0 the framework now has two GACs, this stackoverflow post explains why.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *