I am working on a project that is turning out the builds, sometimes with just a single change in an assembly (we are in bug fixing mode). Doing a full install each time is tedious given that it is a server application with a Windows service, several configuration tools, three Microsoft Office Project Server event handlers, and quite a few dependant assemblies. Manually hunting through the server replacing files got old and batch files assumed knowledge about target directories and other configuration information. I decided to build a patching tool to ease the pain a bit. I call it QuickPatch. Last week I wrote about a new GUI for IExpress, which is the foundation on which QuickPatch is built. Read about IExpress here.
QuickPatch was designed to meet the following requirements:
I can envision many ways this can be used, but I will give you a concrete real world example where this has already been used. I wrote a Windows service that looks to an “agents” directory to periodically load and execute any assembly which implements the IAgent interface. I pushed a full install to the customer’s environment. The next day the engagement manager wanted a change to one of the agents’ behavior. The change was so small that it didn't require a full reinstall so I used QuickPatch to deliver the change. The client received an executable. They ran it and the patch was complete. I used a registry hint (the location of the Windows service) to figure out where the patch should be applied.
There are four major components to QuickPatch:
Let’s take a look at 2-4.
Here is a screen shot of the application with a patch open for editing:
See my previous post for a detailed description of the “Package” tab. Below is a screen shot of the same screen with the “Patch” tab displayed:
Note the Advanced section has a “file map” defined with several sub directories.
Let’s build the patch:
And run the patch:
Clicking the button changes the user interface to show the log of changes (and errors if necessary):
In the registry you can see the path used:
And in the file system you can see the results:
More next week. Have a good weekend.
UPDATE: SlickEdit has some cool gadgets for Visual Studio. Here is a LOC report: