Sharing a single bin folder across multiple sites

During development it’s often useful to have multiple sites (and other app domains) using the same bin folder even if they are located in different locations. My preferred mechanism is to use a directory junction.

E.g. you have a bin folder;


…and some projects




Open command prompt and navigate to each of the project folders and issue the following command (make sure there isn’t already a bin folder in those locations);

mklink /J bin C:\MyTests\bin

…it should display;

Junction created for bin <<===>> C:\web\test1\bin

…there, when the app domains run they’ll look (probe) for the code in the locale bin folder which in reality lives at C:\MyTests\bin. So you can now update a DLL once it will be reflected in all your tests locations. Obviously this my increase your file locking headache but you takes your choice.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s