Gacutil not installed by default in VisualStudio

6.1k Views Asked by At

I am unable to add an assembly into GAC. Please assist in getting it work. I ran following command in VisualStudio13 CMD

gacutil /i “<C:\Program Files\ibm\IBM DATA SERVER DRIVER>\bin\netf40_32\IBM.Data.DB2.Entity.dll”

Error Message: Command "gacutil" is not valid.

Also, i checked there is also no gacutil.exe file on path

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools

C:\Program Files (x86)>dir gacutil.exe /s Command gives me following description

But when i access the path there is no gacutil file as shown: Folder view No gacutil present

2

There are 2 best solutions below

2
BASEER ULHASSAN On BEST ANSWER

The issue was Windows Explorer path(C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\gacutil.exe) had no "gacutil.exe". Accessing the same path through cmd listed down "gacutil.exe" as present.

Thus, instead of just giving command gacutil-i to add an assembly in cache, i gave full path

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0Tools\gacutil.exe -i

Don't trust windows explorer. Trust command credits@ Sir Conrad Frix-Comments

1
iDubrovinsky On

You can either drag-drop the .dll into c:\windows\assembly folder or check C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64 for gacutil as its part of .net framework, not your IDE. Hope it helps!