There is a ton of deployment functionality in .NET but once you decide to deploy into the GAC you end up taking on a whole host of complexities. The reason to deploy into the GAC, however, is simply that you want to share assemblies across multiple applications, perhaps across multiple web applications. Well, how 'bout instead deploying to one directory and then using junction points to sub directories within each application? In so doing you can update any one of the directories and have the update be auto-reflected in all locations. Junction points serve as virtual mirrors of the source directory (known as the junction directory) such that updates (adding, removing, renaming, etc. files/folders) on the junction directory will automagically be reflected in the target directory.
I have this directory on my computer with a bunch of utilities. The problem is, each time I add a new utility I have to manually insert a shortcut from the utility to my Start->Programs menu. Well not any more! Using Junction.exe I linked my utils directory to the ..Start MenuProgramsUtils directory (which didn't previously exist). Now, when I go to my Start->Programs location there is a utilities folder that is an image of the utils directory such that adding anything to the utilities directory will automatically show up in the ProgramsUtils directory and visa versa. Way cool....
Let's consider another example. Say you have a c:data directory on your system into which you want to place all data that needs to be backed up. The problem is, some programs don't allow you to charge where they place their data so you end up having to manually add these other locations to the list of backup directories. Not with Junction.exe. Instead, all you do is junction the applications data directory to the c:data directory and viola! The application saves into its location and this is directly reflected in the data directory even though no copies of the files are made. It is purely virtual! Excellent!
By the way, Mike Woodring has a similar utility called hardlink that did the same thing except on a file basis.
11:02:02 PM
|