views:

39

answers:

2

I have a solution with about 10 different projects - I have a single class library that I am using in quite a few web projects. The problem when I am going to deploy these projects...they are going to have their own bin directories and hence references to this library...so i would need to update the reference on all 9 places/projects whenever i updated the class library....is there way that i could have like a common root bin directory where all the projects could refer from and that when i change the class library it automatically will be updated in all 9 projects since they are reading from a common bin directory ?

A: 

Right click on a project, go to properties, under the build tab, set your output path.

Does that answer your question?

Ziplin
well..not really..i want to refer from a common bin/path...so setting the output path does not really change where it references its dependency dll's from...
Misnomer
+1  A: 

You could install the common library to the GAC (Global Assembly Cache).

http://support.microsoft.com/kb/815808

After you install the DLL to the GAC, you can change the reference in each of your web projects to point to the GAC'd version of the library.

Updated:

Your other option is to load the DLL programmatically/dynamically at runtime (in all web projects that require it). This should only be done under special circumstances.

http://www.c-sharpcorner.com/uploadfile/sridhar_subra/dynamicassemblymethod10132008214835pm/dynamicassemblymethod.aspx

Off the top of my head, the most common "special" circumstance would be if you're application has some sort of plug-in architecture. As you can see in the link above, loading assemblies takes a little work.

Honestly, if you're deploying to a production environment, you should be able to use an MS installer project to deploy your DLL to the GAC. The command-line tools are more for development purposes.

warriorpostman
well..its something i want...but i dont want to run all those command line commands....and i think it has issues with different frameworks..
Misnomer
I updated my answer above with another possible solution.
warriorpostman