Categories
Etc

Using post-build events to make your own app.config

Often times, I have my own configuration files outside of the standard configuration framework (web.config / my.assembly.exe.config, etc).  When I’m developing a WinForm or Console app in VS.NET, I need to get a standard config file into the $(TargetDir) directory so my app will pick it up under testing.  VS.NET does this magic for you if you have an app.config file in the root of your project.  On build, it will be copied to $(TargetDir) and renamed appropriately.  Well, you can do the same thing with a PostBuild event.  Here’s a sample of one I use:

copy $(ProjectDir)MySuperSpecial.config $(TargetDir)MySuperSpecial.config

Very handy and it even works with the <solution/> task in NAnt!

Categories
Etc

A TraceListener that writes to the Console

I keep writing this class over and over.  It’s quite handy.

class ConsoleWriter : System.Diagnostics.TraceListener {
  public override void Write(string message) {
    Console.Write(message);
  }
  public override void WriteLine(string message) {
    Console.WriteLine(message);
  }
}

Categories
Etc

Mossy Breaking Statue

Another older shot from the Sleepy Hollow cemetary.  Much like the cemetary in Buffalo, it’s a great place to walk around and enjoy a quiet day, among amazing sculpture and stained glass work.  As long as you don’t mind all the dead folks.

Categories
Etc

Crappy Self-Portrait

I don’t think I’ve ever really posted a photo of myself, and I’m not sure this one counts…  Taken at work just before I left for the night.  I finally got our fancy new build-system-for-.net-framework-apps up and running, which made it a fine fine day.

Categories
Etc

Tired in Fall

A shot from our field trip to Kykuit one very fall afternoon.  For whatever reason, I didn’t notice my camera was on “center weighted average” metering, so most everything I shot that day came out quite dark.  It’s really too bad; the day has a fantastic quality of light.  The wet day really brought out the color in everything, right at the peak of leaf season.  Next year, I’ll remember to check my metering mode before taking 100+ photos…