Whenever I have a library that use across different websites/ applications I've always just added the library's project into the same solution and reference it from there. This is great when needing to debug within the solution but in all other situations it seems pointless and more space taken up in the solution explorer.
Also another positive or negative is that if that library is updated by someone else in the company and I then build another application which uses the same thing they could possibly have broken the build. If for whatever reason that cannot be fixed with the current application then you could go back into your source control and roll back to an older version, but this seems a bit too OTT.
I was just wondering what other people's thoughts on this subject are. What do you normally do, reference the dll or do you add the project to your solution.
We keep our production Dlls in a well-known location on a network drive and reference is via the DFS UNC path (no drive letter). This way we can have different versions of the library in use at the same time and updates don't break code/force a recompilation until the newer version needs to be used. A standard naming scheme can be used to ensure that if a project always wants to use the latest version it can.
You could also register your dll in the GAC. The GAC handles all referencing, versioning etc and is secure. Having assigned a strong key which is a pre requisite for dlls sitting in the GAC you have a secure way of accessing Dll's and where you are using a shared server this can be invaluable. Your sites which use this dll have a central port of call for the assembly. The GAC has a whole host of advantages with several articles on MSDN and no doubt hundreds on google dedicated to it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With