Yesterday I blogged about advantages and disadvantages of XCopy deployment. I didn’t say however, about one important scenario, where you may need not to use any installers in order to deploy software to a new machine, and that is, setting up project on a new developer’s machine. J.P. blogged about it a few times, so I won’t repeat his words, and get straight to the point.
One piece of software that you certainly will need is Unit Testing framework. My favorite one – MbUnit, can be however downloaded only as installable package, so you will need to perform few additional steps in order to create your own custom package.
First you have to grab the installer, from here. When you download it, don’t run it, but extract its content to a directory, with 7-zip or similar tool. You should end up with similar folder structure. Ignore two uppermost folders: those contain installer files. You can also skip documentation files, and VSSNippets folder (which contains code snippets for Visual Studio, as its name implies), and that leaves us with .exe, .dll and .config files. Which of them you’re going to use, depends on which elements of functionality you’re going to use.
To better see interdependencies between those assemblies, I created dependency diagram with NDepend. If you take close look at it, you’ll notice that only assemblies having dependency on NGraphviz assemblies are… other NGraphviz assemblies. Same with XsdTidy, that is not used by anyone.
Now, to actually write your tests with MbUnit, you certainly are going to need
and its dependencies:
If you’re going to test non-public members you’ll also need
Those are core libraries. The rest depends on how you’re going to run your tests. There are basically four options here
- MbUnit.MSBuild.Tasks.dll, if you run tests as part of your MsBuild build
- MbUnit.Tasks.dll, if you run tests as part of your NAnt build
- MbUnit.Cons.exe and
- MbUnit.Cons.exe.config, to run tests from the command line
- MbUnit.GUI.exe and
- MbUnit.GUI.exe.config to run tests from GUI program.
There are also TestDriven.Framework.dll and MbUnit.AddIn.dll used by TestDriven.Net to run tests from Visual Studio, but I don’t know if they will work without being actually installed (or at least put in Program Files).
Using this approach you can create package that weights around 1MB instead of over 3MB, and can be put in a self contained project directory structure.