Where is GACUTIL for .net Framework 4.0 in windows 7?
Asked Answered
F

4

79

i've made an assembly in the .net framework that I intend to publish to the GAC but I can't find the gacutil utlity.

I've been googling a while and I've found a lot of suggestions, but nothing works:

  • Copy the assemby to %window%\assemby [DOES NOT WORK]
  • Copy the assemby to %window%\Microsoft.NET\assembly [DOES NOT WORK]
  • C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe /i "assembly" [returns an error: this assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded]

Does anyone have idea to solve this?

Flame answered 3/8, 2011 at 10:26 Comment(0)
R
73

If you've got VS2010 installed, you ought to find a .NET 4.0 gacutil at

C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools

The 7.0A Windows SDK should have been installed alongside VS2010 - 6.0A will have been installed with VS2008, and hence won't have .NET 4.0 support.

Randarandal answered 13/9, 2011 at 10:38 Comment(2)
If you are using 64-bit system, it is going to be C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 ToolsManipulator
Hmm, so it seems. Windows SDK 7.1 is available as 64 bit, but it appears that 7.0 was only 32 bit. Weird, I thought I'd copied the file path from Windows Explorer directly into my comment.Randarandal
L
36

VS 2012/13 Win 7 64 bit gacutil.exe is located in

C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools
Locality answered 27/9, 2012 at 18:26 Comment(1)
This also seems to be true for Visual Studio 2013Icily
F
23

There is no Gacutil included in the .net 4.0 standard installation. They have moved the GAC too, from %Windir%\assembly to %Windir%\Microsoft.NET\Assembly.

They havent' even bothered adding a "special view" for the folder in Windows explorer, as they have for the .net 1.0/2.0 GAC.

Gacutil is part of the Windows SDK, so if you want to use it on your developement machine, just install the Windows SDK for your current platform. Then you will find it somewhere like this (depending on your SDK version):

C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools

There is a discussion on the new GAC here: .NET 4.0 has a new GAC, why?

If you want to install something in GAC on a production machine, you need to do it the "proper" way (gacutil was never meant as a tool for installing stuff on production servers, only as a development tool), with a Windows Installer, or with other tools. You can e.g. do it with PowerShell and the System.EnterpriseServices dll.

On a general note, and coming from several years of experience, I would personally strongly recommend against using GAC at all. Your application will always work if you deploy the DLL with each application in its bin folder as well. Yes, you will get multiple copies of the DLL on your server if you have e.g. multiple web apps on one server, but it's definitely worth the flexibility of being able to upgrade one application without breaking the others (by introducing an incompatible version of the shared DLL in the GAC).

Falla answered 3/8, 2011 at 10:46 Comment(0)
P
5

There actually is now a GAC Utility for .NET 4.0. It is found in the Microsoft Windows 7 and .NET 4.0 SDK (the SDK supports multiple OSs -- not just Windows 7 -- so if you are using a later OS from Microsoft the odds are good that it's supported).

This is the SDK. You can download the ISO or do a Web install. Kind-of overkill to download the entire thing if all you want is the GAC Util; however, it does work.

Physoclistous answered 1/11, 2011 at 15:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.