tags:

views:

35

answers:

1

I have created a shared assemby MyLibray version 1.0.0.1 and installed it in gac. Again I created MyLibrary version 1.0.0.2 and installed it in gac.

See the gac screen shot.

alt text

But in Add Reference dialog box only older version 1.0.0.1 is available. See the screenshot. alt text

+2  A: 

Visual Studio will not display two assemblies of same name even if the version of the assemblies are different. If you want multiple versions of the same assembly to appear in the Visual Studio list of installed assemblies, provide a different name for each version of the assembly, like in your case MyLibrary.1.0.0.1.dll and MyLibrary.1.0.0.2.dll.

EDIT: One more way of adding same name assemblies to the dialog box is by placing the assemblies in two separate folders and adding those folders to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders key.

Yogesh
If you see there are 3 assemblies with name msdatasrc right above Mylibrary.
Nadeem
The method used for those assemblies is different. See my updated answer.
Yogesh
Very interesting.
Nadeem