Referencing a Class Assembly from GAC using Visual Studio .Net

Posted on 2004-11-12
Last Modified: 2006-11-17
Hi there,

I am currently building a c# application and have created a seperate class library, which I need to reference from the GAC.

I have given the assembly a strong name and have placed it in the assembly using gacutil and also by draggin the dll into the WINNT/assembly folder.

However when I right click in visual on reference in my application to add a reference to the assembly I cannot find it in the list.

Can anyone help me? Ive tried rebooting, closing down and re-opening the project.. I also cannot manage to delete the assembly so I can try re-installing it.... Any ideas?


Question by:fevster
    LVL 6

    Accepted Solution

    You wouldnt find your custom assemblies (which are placed in the GAC) in the list by default. It requires a Registry Key to appear in the list.
    So, You need to browse to the GAC and add it to the project. GAC is in C:\Windows\Assembly folder
    LVL 1

    Expert Comment


    You have to follow the steps below

    1. Create a strong name for assembly.

    2. Install assembly to GAC.

    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\AssemblyFolders\
     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.

    I think you have done steps 1 & 2 ,follow the step 3.


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now