I would like to know how can we have the same version and public key token for an assembly in GAC. I have opened GAC folder(C:\windows\assembly) and seen that there are assemblies with same name, version number and public key token. How is this possible? As per my knowledge GAC can have same assembly name but different version. Can someone please answer this? I am not able to attach the screenshot here
- You don't actually see the GAC when you look at c:\windows\assembly. You get a cooked view that doesn't really show what's going on. You don't see the processor architecture for example. Look at c:\windows\microsoft.net\assembly instead, home of the .NET 4 GAC without a cooked view.Hans Passant– Hans Passant2014-07-10 17:43:42 +00:00Commented Jul 10, 2014 at 17:43
Add a comment |
1 Answer
Assemblies are identified by their simple name, version number, public key token, supported culture and processor architecture. Although the processor architecture is only optional when referencing assemblies.
MyAssembly, Version=2.0.0.0, Culture=en-US, PublicKeyToken=b77a5c561934e089c, ProcessorArchitecture=msil The GAC can only hold unique assemblies and since you say you see assemblies with the same name, version and public key token, it must be that they either differ in culture, processor architecture or both. Also see here and here.