GAC. To add an assembly to the GAC, drag and drop, but copy and paste not? What for?

I would like to know why drag and drop works, but copy paste does not. What happens with drag and drop that doesn't happen with copy and paste?

+6
copy-paste drag-and-drop gac
source share
2 answers

When you drag your assembly into the C:\windows\assembly folder, it is not actually copied there - a special plug-in for Windows Explorer gacutil to install your assembly in the GAC.

This Explorer plugin can be confusing because it can give the illusion that the GAC is a simple, simple folder with lots of DLLs. In fact, this is a hierarchical structure with a folder for each assembly name, inside which there are folders for different versions, etc.

If you want to see the real structure of the GAC, open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion in the Windows registry and set the DWORD DisableCacheViewer parameter to 1 . This will disable the Cache Viewer plugin, which will make the GAC so simple (but it will also make dragging and dropping for installation unsuitable - you will have to call gacutil yourself). Of course, you can also use alternative file managers or the console if you do not want to enter the registry settings.

Regarding the reasons why copying doesn't work, I believe that anyone who designed the Cache Viewer plugin thought that drag and drop was a good metaphor for putting something in the GAC, whereas copying and pasting would really make the GAC look like a regular folder. but not .

+15
source share

Thanks Dan Abramov: I added something else about the fact that

Problem: copy and paste does not work in the assembly to install the new dll library (C: \ windows \ assembly)

Ans: - you can see the architecture of the folder by changing the regedit entry using the string "DisableCacheViewer" DWORD in HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Fusion to make it "1"

so you can see the folder view under the same one.

and you can reset all other Dll assemblies through the utility Open CMD and enter below to use the Utility to install "gacutil / i.dll"

for UN-install "gacutil / u.dll"

if you need to install / uninstall more than one assembly so you can use

/ il

and

/ μl

option

the best thing is that you can make a batch file and run under "C: \ Program Files (x86) \ Microsoft Visual Studio 8 \ SDK \ v2.0 \ Bin" only

Thanks. Ashutosh Sony

0
source share

All Articles