Tuesday 18 March 2008

gacutil is not recognized as an internal or external command, operable program or batch file

Sometimes, you want to run gacutil from the command line:

gacutil /i {assemblyPath}

On some computers (depending on the installation), you might get the following error message:

'gacutil' is not recognized as an internal or external command, operable program or batch file

You'll need to download and install the Visual Studio 2005 SDK. Included in the SDK is gacutil.exe. In order for Windows to recognise the gacutil command, you'll also need to modify the Path variable (Environment Varabiables). Simply add the location of the executable which is normally:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin

Remember to include a semi-colon before adding the folder location.

2 comments:

Ian Dykes said...

Or if you can't install the full SDK and still need gacutil you can just copy the exe and exe.config from a machine that does have the SDK installed.

Anonymous said...

If you open up the VS 2008 (or 2005) command prompt (Start -> Programs -> VS 2008 -> VS 2008 Tools), you will no longer receive this message.