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. .NET (Core and Framework)
  4. Placing my .DLL into Reference List

Placing my .DLL into Reference List

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharp
7 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.
  • M Offline
    M Offline
    Martin Cross
    wrote on last edited by
    #1

    I'm assuming this is relatively easy and my n00b status is hindering me. I have a set of .DLLs written in C# that want to be able to distribute to other members of development, and instead of them having to browse the hard disk to find my .DLL to place a reference into their app, I want it to come up in the list .NET references. I had assumed that once a .DLL was given a strong name that perhaps the reference list would also show my libraries - but alas no! Is this something relatively easy to do, or are my developers forced to browse reams of folders! Ta.

    J H 2 Replies Last reply
    0
    • M Martin Cross

      I'm assuming this is relatively easy and my n00b status is hindering me. I have a set of .DLLs written in C# that want to be able to distribute to other members of development, and instead of them having to browse the hard disk to find my .DLL to place a reference into their app, I want it to come up in the list .NET references. I had assumed that once a .DLL was given a strong name that perhaps the reference list would also show my libraries - but alas no! Is this something relatively easy to do, or are my developers forced to browse reams of folders! Ta.

      J Offline
      J Offline
      John Arlen
      wrote on last edited by
      #2

      An assembly must be registered with the Global Assembly Cache to be accessible outside the application directory. Further, an assembly must be strong named to be added to the GAC. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfglobalassemblycacheutilitygacutilexe.asp

      K 1 Reply Last reply
      0
      • J John Arlen

        An assembly must be registered with the Global Assembly Cache to be accessible outside the application directory. Further, an assembly must be strong named to be added to the GAC. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfglobalassemblycacheutilitygacutilexe.asp

        K Offline
        K Offline
        Kentamanos
        wrote on last edited by
        #3

        Putting something into the GAC is not enough I believe to make it show up in assemblies you can reference from inside the IDE (add reference, first tab). There's some registry entries I believe as well, but I can't find that info at the moment. EDIT: Found the KB article Putting Assemblies into Reference List


        I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
        -David St. Hubbins

        M 1 Reply Last reply
        0
        • K Kentamanos

          Putting something into the GAC is not enough I believe to make it show up in assemblies you can reference from inside the IDE (add reference, first tab). There's some registry entries I believe as well, but I can't find that info at the moment. EDIT: Found the KB article Putting Assemblies into Reference List


          I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
          -David St. Hubbins

          M Offline
          M Offline
          Martin Cross
          wrote on last edited by
          #4

          Thanks for that, that was the answer. Your help is much appreciated.

          1 Reply Last reply
          0
          • M Martin Cross

            I'm assuming this is relatively easy and my n00b status is hindering me. I have a set of .DLLs written in C# that want to be able to distribute to other members of development, and instead of them having to browse the hard disk to find my .DLL to place a reference into their app, I want it to come up in the list .NET references. I had assumed that once a .DLL was given a strong name that perhaps the reference list would also show my libraries - but alas no! Is this something relatively easy to do, or are my developers forced to browse reams of folders! Ta.

            H Offline
            H Offline
            Heath Stewart
            wrote on last edited by
            #5

            Another options if they are allowed to have the source (even if read-only) is to let them add the projects to their solution and insert a project reference (it's actually a VS.NET thing where the output of a project - depending on the current build configuration (debug, release, etc.) - is copied to the bin directory of the target project. It's handy in multi-developer projects where everyone works on various projects.

            -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

            M 1 Reply Last reply
            0
            • H Heath Stewart

              Another options if they are allowed to have the source (even if read-only) is to let them add the projects to their solution and insert a project reference (it's actually a VS.NET thing where the output of a project - depending on the current build configuration (debug, release, etc.) - is copied to the bin directory of the target project. It's handy in multi-developer projects where everyone works on various projects.

              -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

              M Offline
              M Offline
              Martin Cross
              wrote on last edited by
              #6

              Oh yes, this is absolutely an option available to the coders. I wanted to have the best of both worlds. Unfortunately though during development everyone can pick and choose the common components with ease, we're having a bastard time at run-time. Despite having placed the .DLLs in the GAC, the executables cannot find their dependant .DLLs. They only function when the .DLL is sitting in the exe's own directory. I have now lost 50% of my hair. Expecting the other %50 to disappear today.

              H 1 Reply Last reply
              0
              • M Martin Cross

                Oh yes, this is absolutely an option available to the coders. I wanted to have the best of both worlds. Unfortunately though during development everyone can pick and choose the common components with ease, we're having a bastard time at run-time. Despite having placed the .DLLs in the GAC, the executables cannot find their dependant .DLLs. They only function when the .DLL is sitting in the exe's own directory. I have now lost 50% of my hair. Expecting the other %50 to disappear today.

                H Offline
                H Offline
                Heath Stewart
                wrote on last edited by
                #7

                If you have a application config file, make sure that you're not explicitly setting the codebase for dependent assemblies. Otherwise, you're .NET installation is screwed up. Dependency resolution first checks the current and private paths (like the bin folder in ASP.NET applications), then it looks in the GAC for assemblies. One you thing you could do to see why the bindings aren't occurring is to start fuslogvw.exe, make sure logging is turned on, then start your application. Refresh fuslogvw and see what it says. If it states something about not being able to find the localized resources for your default locale (like mine is "en-US"), you can either ignore these - or to make your assembly resolution faster, add the assembly-level attribute assembly: System.Globalization.NeutralResourcesLanguage("en-US"); (with the appropriate locale). For each binding error, it will show you everywhere it attempted to look which might help you resolve the problem.

                -----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----

                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