Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created one ClassLibrary(ClassLibrary1.dll), signed it using sn.exe and installed in GAC.
It's visible in C:\Windows\Assembly folder. please refer below link for screenshot.
http://imgur.com/a/oOmaJ[^]

I have created another project in which I want to use this signed assembly stored in GAC. but I am unable to add reference. I am using .Net Framework 2.0. This scenario is working fine in .net 4.0 where dll is stored in C:\Windows\Microsoft .Net\GAC_MSIL\.

In the link http://imgur.com/tqEOTvC[^] the dll is visible in GAC , but when I try to put the same path while adding the reference it gives the error shown in the link http://imgur.com/pZlloES[^]

Can someone help me with this issue. I amnot able to figure out whether this is a .Net version issue or something else.


Posted
Comments
Sergey Alexandrovich Kryukov 17-Jul-14 2:39am    
Hard to believe. 2.0 has the same mechanism. How did you try it? Did you add a reference using Visual Studio .NET tab of "Add Reference" window? How did you check up that the "dll is visible in GAC", exactly?
—SA
Priyanka_L 17-Jul-14 4:36am    
yes. I have used "Add Reference" window only. I have given one link of command prompt in which it shows that assembly is there in GAC : http://imgur.com/tqEOTvC
Sergey Alexandrovich Kryukov 17-Jul-14 12:55pm    
You did not answer: ".NEW" tab or anything else.

No, this image is not a correct evidence that the assembly is in GAC (even though it could really be there, but you still have a problem, haven't you? :-). That's why I was worrying about it. Windows has special API for that. One evidence is that you can see that assembly in that ".NET" tab.

—SA
Pheonyx 17-Jul-14 4:03am    
Is the first DLL you made a .Net version 2 assembly or new one? If it is newer than .Net 2 then I don't believe you will be able to add it as .Net2 project (I don't believe) can access a .Net 4 dll, it only works the other way around.
Priyanka_L 17-Jul-14 4:40am    
I have created assembly using .Net version 2(on office pc). I have checked with .Net 4 on other system where .Net 4(on personal pc at home) is installed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900