2
votes

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
It's weird that it's missing. You could try installing the SDK as this answer suggestsConrad Frix
I installed Windows SDK @Path = C:\Program Files (x86)\Windows Kits\8.0 There is still no GACUTIL.exe in it. It must be included in VS13 as well. I went through your suggested answer link earlier but no good :(BASEER ULHASSAN
I know it sounds obvious but did you try doing something like C:\Program Files (x86)>dir gacutil.exe /s I found no less than 12 versions of itConrad Frix
It finds gacutil.exe in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools AND C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64. But no such files visible. Also, there are visible gacutil named files in SDK path like C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin however in .\NETFX 4.0 Tools\x64 path i cant find one.BASEER ULHASSAN
I'm confused. You say that dir finds it but then you say no such files are visible. Can you explain what you mean by not visible?Conrad Frix

2 Answers

4
votes

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

0
votes

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!