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;

C:\MyTests\bin

…and some projects

C:\web\test1

C:\web\test2

C:\winApp\test3

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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s