Sunday, February 25, 2007

Humping USB Doggie

Could this be the most useless USB gadget yet?

kick it on Shout it

Saturday, February 24, 2007

Adding Pre and Post build events to Web Projects

It is amazing how often I come across things in Visual Studio that seem like they should be simple enough.

Recently, one such thing was adding a post-build event to a Web Project. Of course the first place to look is the project properties. But there is no sign of it there. A little odd, why shouldn't I be able to have events on my build for a Web Project?

You can! A quick investigation of the .csproj project file in your project path shows the PreBuildEvent and PostBuildEvent configuration values sitting there. And you can edit them with your favorite editor and add in you pre and post events as you wish.

To easy - when you don't try to use the Visual Studio IDE!

        <!-- Your Build Events Here -->
        PreBuildEvent = ""
        PostBuildEvent = ""
        <!-- RunPostBuildEvent = "Always" | "OnBuildSuccess" | "OnOutputUpdated" -->
        RunPostBuildEvent = "OnBuildSuccess"

kick it on Shout it

New adventures in Continuous Integration

It has been a while since I have setup a continuous integration environment from scratch, but here again I find myself doing it.

Each time I setup an environment there is something subtly different, or there are better ways to do things based on new releases of CruiseControl, NAnt, NUnit and friends.

Luckily there are blog entries like this one that can help with parts of the process.

Continuous Integration Setup

kick it on Shout it

VS2003, ASP.Net and Subversion

Subversion and the ASP.Net Hack

I was recently converting the source control for a product over to SubVersion and this little funny came up. The problem is with directories in the ASP.Net Web Project folder that start with a '.' - directories such as .svn.

Now with that minor inconvenience it is not possible to load the Web Projects into Visual Studio 2003. Luckily the developers of Subversion have coded around Microsoft's stupidity by adding a compatibility flag for the Windows version of Subversion. Set the SVN_ASP_DOT_NET_HACK environment variable in your profile to the value '*' and re-checkout all of your code. The .svn directories will have become _svn directories.

One gotcha is that this is only supported in the Windows version of Subversion. Just be aware that using any other platform on your 'Windows-fied' checkout directories won't work!

Of course you can always avoid the problem by steering away from Web Projects and implementing web solutions as standard class libraries.

kick it on Shout it