This was driving me a bit nuts as testing strong singing and installation to GAC of assemblies was working on one of my PC's, but not the other. This was the case with snk key files and pfx.
They could not be installed via either a drag and drop into the Assembly via explorer, or using the mscorcfg.msc tool.
I then realised the test开发者_开发百科 class libraries I was using were defaulting to framework version 3.5 on one PC, and v 4 on the other.
So hey presto, change the target framework to 3.5, and the assemblies that were subsequently built can be installed in the GAC as normal.
Can anyone verify this issue and possibly advise a work around for it?
Thanks.
.NET 4.0 uses a new location of the GAC. It isn't c:\windows\assembly anymore, the GACed files are now stored in c:\windows\microsoft.net\assembly. The shell extension handler isn't available for this directory, at least on my machine, so you won't have the drag-and-drop capability in Windows Explorer anymore. Be sure to use the .NET 4.0 version of gacutil.exe so the proper directory is used. Use the Visual Studio Command Prompt (2010) shortcut in the Start menu.
Note that installing assemblies into the GAC is a very unusual thing to do on a dev or test machine. The GAC is a deployment detail.
精彩评论