Placing my .DLL into Reference List
-
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.
-
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.
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
-
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
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 -
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. HubbinsThanks for that, that was the answer. Your help is much appreciated.
-
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.
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-----
-
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-----
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.
-
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.
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-----