.NETGURU
How to add shared assembly in the add reference
Messages   Related Types
This message was discovered on microsoft.public.dotnet.faqs.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

babu dhayal via .Net Guru (VIP)
(Type your message here)

--------------------------------
From: babu dhayal

i have deployed an assembly in the GAC by creating a strong name key and then executing a command at .NET prompt gacutil.exe -i assemblyname.dll, but when i need to add this assembly in another application, i dont find this assembly in the add reference dialog......so plz could u help me how to add it in add reference dialog?

-----------------------
Posted by a user from .Net Guru (http://www.dot-net-guru.com/)

<Id>XmrAgrWUxUK/Vdt1iM4geg==</Id>
Reply to this message...
 
    
Nelson Xu
Install an Assembly in GAC (Global Assembly Cache)

Section 1: Create a strong name for assembly:
<1> Go to command prompt;
<2> Type C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\v1.1\Bin\;
<3> Type sn -k "C:\[PathInVSProject]\Projectname.snk"
<4> Add <Assembly: AssemblyKeyFile
("..\..\Projectname.snk")> to AssemblyInfo.vb in VS
project;
<Assembly: AssemblyTitle("")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("")>
<Assembly: AssemblyCopyright("")>
<Assembly: AssemblyTrademark("")>
<Assembly: CLSCompliant(True)>
<Assembly: AssemblyKeyFile("..\..\projectname.snk")>

<5> Rebuild VS project(it will generate a new strong
named dll);

Section 2: Install assembly to GAC:
<1> Go back to command prompt(make sure that location
still points to C:\Program Files\Microsoft Visual
Studio .NET 2003\SDK\v1.1\Bin\;
<2> Type gacutil -I "C:\[PathToBinDirectoryInVSProject]
\projectname.dll"(if project is in release mode)
gacutil -I "C:\[PathToObj\DebugDirectoryInVSProject]
\projectname.dll"(if project is in debug mode)

Section 3: Register assembly entry in registry:
<1> Click Start - run, then type regedit to open registry;
<2> Go to
HEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\Assembly
Folders\;
<3> Right click AssemblyFolders, then select new to
create a new key for your assembly(for example:
Security);
<4> Select Modify by right clicking Default, then enter
the location where your dll resides.

Now, you should be able to see the name of your dll from
the reference list when you open a VS project.     

Good luck !

[Original message clipped]

prompt gacutil.exe -i assemblyname.dll, but when i need to
add this assembly in another application, i dont find this
assembly in the add reference dialog......so plz could u
help me how to add it in add reference dialog?
[Original message clipped]

Reply to this message...
 
    
Raja Sekhara Reddy K
Pls try to copy the dll into a folder and give that folder name in the
registry path.
as dot net ide is using to load all the assemblies from the path given in
the registry.

Reg Key Path

My Computer\HKLM\Software\Microsoft\.NetFrameWork\AssemblyFolders

set the default value of your AssemblyFolders value to your physical folder
where you have added the signed dll files.
thanks .
raj

"babu dhayal via .Net Guru" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
(Type your message here)

--------------------------------
From: babu dhayal

i have deployed an assembly in the GAC by creating a strong name key and
then executing a command at .NET prompt gacutil.exe -i assemblyname.dll, but
when i need to add this assembly in another application, i dont find this
assembly in the add reference dialog......so plz could u help me how to add
it in add reference dialog?

-----------------------
Posted by a user from .Net Guru (http://www.dot-net-guru.com/)

<Id>XmrAgrWUxUK/Vdt1iM4geg==</Id>

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification