Loren Halvorson's Blog
If your only tool is a hammer...
-
C# 101 - Representing a double quote in string literals
I'm sure almost every C# developer already knew this, but I thought a post might help the few that didn't. I had always wondered how it was done and stumbled across it yesterday buried in an example in the C# Language Specification.
-
Invoking different NAnt targets on different versions of Windows
A friend just asked me how to invoke different targets for different versions of Windows using NAnt 0.84. At first I told him to start using NAnt 0.85 so he could use the new string comparison functions, but as I thought about it more, I realized that it's not hard to do without resorting to functions, the following will work fine in either version of NAnt:
-
A better way to set the version into the VersionInfo.cs file
In my previous post I mentioned that I had written my own <setversion> task to set the file version number in the centralized VersionInfo.cs. I took another look at NAnt's built in tasks, and <asminfo> does exactly what I need. I just changed the NAnt build script to write out VersionInfo.cs like this:
-
Versioning Groups of Assemblies in sync
We often build groups of assemblies that all need to be marked with the same build number. Rather than having the build check out a whole bunch of AssemblyInfo.cs files from source control, set their file versions, and check them in, we use Visual Studio .NET's handy and (not widely known) Linked file feature to centralize the version information into a single file. Then the build only has to worry about updating the build number in one place. Here's how we do it.
-
Forehead slapper on DateTime.AddDays()
I should have read the documentation for DateTime.AddDays() a little more carefully. This one caused a minor bug for me this week:
-
Using Lava Lamps to show continuous integration build status
To indicate the status of a continous build, the pragmatic programmer shows how to use a pair of Lava lamps, one red and one green with an X10 Firecracker computer interface. Very clever, and low-tech.
-
Deploying .NET config files
One tricky aspect of deploying a .NET application to a variety of environments (development, test, integration, production) is managing the config files. The more environments and the more config files you have, the bigger your problem.
-
New "tallow" tool included in latest WiX
Rob Mensching just posted version 2.0.1927.0 of the WiX toolkit on SourceForge. It includes a new tool named tallow that does all sorts of interesting things. More on its capabilities in a bit, first I wanted to mention that it looks like the distribution forgot to include a compiled version of tallow.exe.
-
Another Ambient Orb used for continuous integration status
Thanks to David Weller for pointing out an article on Mike Swanson's blog about how he uses the Ambient Orb to indicate continuous integration build status. This is identical to the way we have it set up.
-
WiX FileGroup element considered evil
My previous post details a method to use WiX and NAnt to automatically generate MSI's as part of an automated build. I'm going to recommend that no one follow the part of that example that auto-generates the WiX XML. I'm going to blame my spam filter. Let me explain...