I would like to know why drag and drop works, and copy paste doesn't. What is happening with a drag and drop that isn't happening with a copy and paste?
Open Windows Explorer and navigate to the %WINDIR%\Assembly folder (this is not the physical path, but is a view into the combined GACs) Copy and Paste (Drag and drop) the new DLL file into the Assembly folder.
When you drag and drop your assembly into C:\windows\assembly
folder, it doesn't really get copied there—a special Windows Explorer plugin callis gacutil
to install your assembly into GAC.
This Explorer plugin can be confusing because it may give one an illusion that GAC is just plain simple folder with lots of DLLs. Actually, it is a hierarchical structure with a folder for each assembly name, inside of which there are folders for different versions, and so on.
If you want to see the real GAC structure, open HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
in Windows Registry and set DWORD DisableCacheViewer
to 1
. This will disable Cache Viewer plugin that makes GAC look so simple (but it also will make drag and drop to install unusable—you'll have to call gacutil
yourself). Of course, you can use alternative file managers or console as well, if you don't want to mess with registry settings.
As for the reasons why copy-pasting does not work, I believe whoever designed Cache Viewer plugin thought that drag and drop is a good metaphor for putting something in GAC, whereas implementing copying and pasting would really make GAC seem like a normal folder—which it is not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With