Visual Studio 2010 Command Prompt Here

Real developers live on the command line. Way back in 1996, Microsoft released the Command Prompt Here Power Toy to ease their pain. Industrious developers who preferred the Visual Studio command prompt took it and adopted it to run a Visual Studio command prompt with all of the paths to Visual Studio and .NET tools [...]

Installing Ruby on Rails on Windows

I have been planning on learning Ruby on Rails for awhile now, but I have heard that running it on Windows was problematic. The download page makes it sound pretty easy though, so I thought I would give it a try. Install Ruby First we need the Ruby language itself. I picked up the 1.9.1 [...]

Migrating from Subversion to Mercurial

I have been reading about Git and Mercurial everywhere lately, so I wanted to give them a try. I mainly develop on Windows and the tools for Windows are better for Mercurial, so I decided to start with it. The best way to get a feel for is with real code, so I decided to [...]

The dangers of Macros

Another developer came to me with a problem today that he couldn’t figure out. He couldn’t believe what he was seeing in the debugger and needed a second set of eyes. He had a line of code like the following; return max( eRetVal, GetNumber() ); While debugging, he noticed that he was stepping into the [...]

log4net UdpAppender with IPv6 on Windows Vista and 7

log4net is a great logging framework for .NET, but it hasn’t been updated in years. When we moved to Windows Vista, we noticed that the UdpAppender stopped working with Chainsaw and with our internal logging tools when logging to localhost. After some Googling, we discovered that replacing localhost with 127.0.0.2 got everything working and we [...]

Extending CopyHelper using Extension Methods

In my last two posts, I have been developing a small utility library to do the grunt work of copying data from an instance of one class to an instance of another type. The Copier class from my last post allows me to copy all public properties from one class to another class as long [...]

Extending CopyHelper using Generics

In my last post, I created a method that does the grunt work of copying data from an instance of one class to an instance of another type. I often find myself copying data between the properties of my data layer classes and those of my user interface like this. // Copy the data from [...]

Method to Copy Data Between Objects of Different Types

One thing that I find tiresome when using the various Model/View patterns is the constant copying of data between the model and the view. Too often, I find myself writing code like this to copy data between an ICustomer and an ICustomerView; // Copy the data from the customer to the view view.Address = customer.Address; [...]

Read Properties from an MSI File

Today I was working writing auto-updating for some software. I wanted to base it on the Product Version property in the installer MSI file, so I needed some code to read that from the file. It took a fair amount of searching and code tweaking, but I finally worked it all out. Add a reference [...]

log4net Slides and Example Code

I have been contacted people who cannot attend my Toronto Code Camp session on log4net tomorrow requesting a copy of my presentation and example code. I cannot find it posted on the Code Camp site, so here is a copy for anyone who is interested. The presentation is in PowerPoint 2007 and the example code [...]