Installing Components into the GAC


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Installing Components into the GAC

  1. #1
    Steve Blair Guest

    Installing Components into the GAC


    I need to install a component into the global assembly cache (GAC). I'm able
    to do this.

    What do I do to get VS.NET to recognize its presence? If I select the Add
    Reference... menu item my component/class is not listed among the others.

    Thanks in advance,

    Steve

  2. #2
    Kathleen Dollard Guest

    Re: Installing Components into the GAC

    Steve,

    Two possibilities here:

    Either you are working with the references list with a VB6 mindset (I did
    this) and failed to register what the menu item says "Add Reference". It
    does not list currently selected references. For this, go to references
    under the project name in the solution explorer.

    Or, you are trying to reference a component or control and are surprised
    that it is not showing up in the controls toolbox. To do this right click
    the toolbox and select "Customize". You have to add your control to both the
    toolbox and the references list. In my experience, when you update your
    control you only have to read it to the references list and you do not have
    the COM problems of trashing your form if you remove and read a control
    reference.

    If neither idea helps, I think you will have to clarify your problem.

    --
    Kathleen
    (MS-MVP)
    Reply in the newsgroup so everyone can benefit
    --



  3. #3
    martin rydman Guest

    Re: Installing Components into the GAC


    I'm puzzled just the same. I've got a DLL that I've dragged into the GAC.
    It shows there among all the others. I then create a new project, click Add
    Reference in the References section in Solution Explorer, but my assembly
    won't show up. Yes, I could browse for the actual DLL, but that seems to
    miss the whole point of having a GAC, or am I missing something here?

    TIA

    /Martin

    "Kathleen Dollard" <kathleen@nomailplease.org> wrote:
    >Steve,
    >
    >Two possibilities here:
    >
    >Either you are working with the references list with a VB6 mindset (I did
    >this) and failed to register what the menu item says "Add Reference". It
    >does not list currently selected references. For this, go to references
    >under the project name in the solution explorer.
    >
    >Or, you are trying to reference a component or control and are surprised
    >that it is not showing up in the controls toolbox. To do this right click
    >the toolbox and select "Customize". You have to add your control to both

    the
    >toolbox and the references list. In my experience, when you update your
    >control you only have to read it to the references list and you do not have
    >the COM problems of trashing your form if you remove and read a control
    >reference.
    >
    >If neither idea helps, I think you will have to clarify your problem.
    >
    >--
    >Kathleen
    >(MS-MVP)
    >Reply in the newsgroup so everyone can benefit
    >--
    >
    >



  4. #4
    Mattias Sjögren Guest

    Re: Installing Components into the GAC

    Martin,

    >I've got a DLL that I've dragged into the GAC.
    >It shows there among all the others. I then create a new project, click Add
    >Reference in the References section in Solution Explorer, but my assembly
    >won't show up.


    The Add Reference dialog lists assemblies from
    %systemroot%\Microsoft.NET\Framework\v1.0.xxxx\, plus any assemblies
    in the directories listed under
    HKLM\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders in the Registry.
    It does not look in the GAC.


    Mattias

    ===
    Mattias Sjögren (VB MVP)
    mattias @ mvps.org
    http://www.msjogren.net/dotnet/

  5. #5
    martin rydman Guest

    Re: Installing Components into the GAC


    Hi mattias!

    OK, so let's say I've got app A and app B, both needing component X, and
    I want to place X in the GAC.

    Let's skip installers, just so I get the essentials. I compile my app's against
    my strong named X.DLL. I copy my DLL to some folder on a target machine.
    I copy my apps to some other (unrelated to X) folders on the target machine.
    I drag my DLL into the target-machine's GAC.

    That's it?

    (I've only got one .NET-enabled computer right now, so I can't actually test
    it...)

    TIA!

    /Martin

  6. #6
    Mattias Sjögren Guest

    Re: Installing Components into the GAC

    Martin,

    >Let's skip installers, just so I get the essentials. I compile my app's against
    >my strong named X.DLL. I copy my DLL to some folder on a target machine.
    >I copy my apps to some other (unrelated to X) folders on the target machine.
    >I drag my DLL into the target-machine's GAC.
    >
    >That's it?



    Yes, that sounds like it should work.


    Mattias

    ===
    Mattias Sjögren (VB MVP)

  7. #7
    martin rydman Guest

    Re: Installing Components into the GAC


    Thanks mattias!

    /Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center