Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Add Reference

Add Reference

Scheduled Pinned Locked Moved C#
csharpquestioncom
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    albean
    wrote on last edited by
    #1

    Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window. I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll. How do I get that library to appear in the .NET section of the Add reference window? Thanks.

    J D A I 4 Replies Last reply
    0
    • A albean

      Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window. I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll. How do I get that library to appear in the .NET section of the Add reference window? Thanks.

      J Offline
      J Offline
      J Dunlap
      wrote on last edited by
      #2

      To add it to the .NET section of the Add Reference, you have to add it to the Global Assembly Cache after signing it with a strong name. But, you can always just browse for its file using the Assembly Browser tab (or whatever it's called in VS.NET).

      "Blessed are the peacemakers, for they shall be called sons of God." - Jesus
      "You must be the change you wish to see in the world." - Mahatma Gandhi

      1 Reply Last reply
      0
      • A albean

        Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window. I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll. How do I get that library to appear in the .NET section of the Add reference window? Thanks.

        D Offline
        D Offline
        Derek Lakin
        wrote on last edited by
        #3

        The GAC and a strong name isn't the only solution*. You can also add the path to your library to the registry. For example, I put all my libraries (and other's) in C:\Development\Third Party\bin\, so I added the following key to the registry: HKCU\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Third Party\ I then set the (Default) string value to the above path. You can use the HKLM hive instead, if you want the setting to apply to all users. * In fact, according to the docs adding it to the GAC won't work anyway, because the Add Reference dialog is path-based and doesn't enumerate the GAC. Derek Lakin. Try the Code Store for instant integrated access to an online repository of .NET components. The great thing about being a slayer: is kicking ass is comfort food. Buffy Salamander Software Ltd.

        I 1 Reply Last reply
        0
        • A albean

          Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window. I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll. How do I get that library to appear in the .NET section of the Add reference window? Thanks.

          A Offline
          A Offline
          albean
          wrote on last edited by
          #4

          Thanks guys, Good info.

          1 Reply Last reply
          0
          • D Derek Lakin

            The GAC and a strong name isn't the only solution*. You can also add the path to your library to the registry. For example, I put all my libraries (and other's) in C:\Development\Third Party\bin\, so I added the following key to the registry: HKCU\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Third Party\ I then set the (Default) string value to the above path. You can use the HKLM hive instead, if you want the setting to apply to all users. * In fact, according to the docs adding it to the GAC won't work anyway, because the Add Reference dialog is path-based and doesn't enumerate the GAC. Derek Lakin. Try the Code Store for instant integrated access to an online repository of .NET components. The great thing about being a slayer: is kicking ass is comfort food. Buffy Salamander Software Ltd.

            I Offline
            I Offline
            Ista
            wrote on last edited by
            #5

            you can also use the probing tag name inside the config file to locate its path you can also copy the file to the apps directory so many choices, I wouldnt put it into the GAC so early

            1 Reply Last reply
            0
            • A albean

              Back in the COM days when I compiled a com dll it would automatically be registered. I could then go and add it as a reference in another project by choosing it from reference window. I just created and complied a C# Class Library component. When I open another solution and try to add that component it does not appear in the .NET list (or anywhere). I have to browse to the component's directory and select that dll. How do I get that library to appear in the .NET section of the Add reference window? Thanks.

              I Offline
              I Offline
              Ista
              wrote on last edited by
              #6

              add it to the GAC and it should. The reason is because vs did the regsvr32.exe for you. It hasnt changed just the options

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups