How to add shared assembly in the add reference

Discussion in 'ASP .Net' started by babu dhayal via .NET 247, Aug 5, 2004.

  1. (Type your message here)

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

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

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>XmrAgrWUxUK/Vdt1iM4geg==</Id>
    babu dhayal via .NET 247, Aug 5, 2004
    #1
    1. Advertising

  2. 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 247" <> wrote in message
    news:...
    (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 247 (http://www.dotnet247.com/)

    <Id>XmrAgrWUxUK/Vdt1iM4geg==</Id>
    Raja Sekhara Reddy K, Aug 10, 2004
    #2
    1. Advertising

  3. babu dhayal via .NET 247

    Nelson Xu Guest

    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-----
    >(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 247 (http://www.dotnet247.com/)
    >
    ><Id>XmrAgrWUxUK/Vdt1iM4geg==</Id>
    >.
    >
    Nelson Xu, Aug 17, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Prasanna Padmanabhan
    Replies:
    1
    Views:
    802
    Mattias Sjögren
    Nov 19, 2003
  2. Horatiu Margavan via .NET 247

    Assembly's manifest definition does not match the assembly reference.

    Horatiu Margavan via .NET 247, Aug 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    3,593
    Horatiu Margavan via .NET 247
    Aug 30, 2004
  3. Replies:
    5
    Views:
    600
    Vitaly
    Jan 28, 2007
  4. Monty
    Replies:
    2
    Views:
    489
    Walter Wang [MSFT]
    Jun 6, 2007
  5. JB
    Replies:
    0
    Views:
    921
Loading...

Share This Page