Adding assemblies to the GAC

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert Smith

    #1

    Adding assemblies to the GAC

    Hello,
    I have a problem with inherited forms. I have a project containing
    base forms and also in my main project I have forms that inherit these base
    forms. However I ofthen get random errors in my inherited forms saying that
    certain controls aren't
    declared when quite clearly they are. Often re-loading the solution will
    cure this problem. The ms knowledgebase indicates that this is because the
    assembly does not exist in the Global Assembly Cache.

    How do I add the assembly for the Base forms to the GAC?
    I know that you can go Gacutil -ul <assembly name> , but how do I find out
    what
    the assembly name is? Is it the name of the dll? is the full path required.
    The whole
    area of assemblies is very confusing.
    This inherited forms problem seems to be a major bug in visual studio .net
    2003.

    Thanx in advance

    Robert
  • Bob Powell [MVP]

    #2
    Re: Adding assemblies to the GAC

    The name will indeed be the DLL filename. Be aware however that any assembly
    that you wish to place in the assembly cache must be strong named. You can
    do this manually using sn.exe or alternatively use sn to generate a set of
    keys and reference the key file in the assemblyinfo file.

    Take a look at the assemblyinfo file for your DLL, you will see that it has
    instructions for strong naming with the IDE included.

    --
    Bob Powell [MVP]
    Visual C#, System.Drawing

    Ramuseco Limited .NET consulting


    Find great Windows Forms articles in Windows Forms Tips and Tricks


    Answer those GDI+ questions with the GDI+ FAQ


    All new articles provide code in C# and VB.NET.
    Subscribe to the RSS feeds provided and never miss a new article.





    "Robert Smith" <RobertSmith@di scussions.micro soft.com> wrote in message
    news:6013DD50-7068-4331-8BC1-38E11BDF8610@mi crosoft.com...[color=blue]
    > Hello,
    > I have a problem with inherited forms. I have a project containing
    > base forms and also in my main project I have forms that inherit these
    > base
    > forms. However I ofthen get random errors in my inherited forms saying
    > that
    > certain controls aren't
    > declared when quite clearly they are. Often re-loading the solution will
    > cure this problem. The ms knowledgebase indicates that this is because the
    > assembly does not exist in the Global Assembly Cache.
    >
    > How do I add the assembly for the Base forms to the GAC?
    > I know that you can go Gacutil -ul <assembly name> , but how do I find out
    > what
    > the assembly name is? Is it the name of the dll? is the full path
    > required.
    > The whole
    > area of assemblies is very confusing.
    > This inherited forms problem seems to be a major bug in visual studio .net
    > 2003.
    >
    > Thanx in advance
    >
    > Robert[/color]


    Comment

    Working...