Source Control, CI

Bug in MsBuild: Linked files in Web Application projects are not deployed properly

  Lately I’m playing a lot with TFS and at the moment I’m porting a NAnt deploy script over to TFSBuild with MsBuild. Our project includes a few linked files, and in the drop location we found out that the folder structure is not what we were expecting: instead of having the linked files deployed to the correct location, they were copied in their original location. Googling around we (a blog-less colleague and I) found a very nice post that explains were the problem lies (a bug in the target named _CopyWebApplication inside the Microsoft.WebApplication.targets file) and a solution for it. The solution is...

How to simulate RowTest with MS Test

One of the best feature that is in mbUnit since 2004 is RowTest, which is the ability to perform the same test using different input data and expected results. RowTest [RowTest] [Row(1,1,2)] [Row(2,1,3)] [Row(1,-1,0)] public void SumTest(int a1, int a2, int result) { Assert.AreEqual(a1 + a2, result); } The cool thing is that each "row" is treated as a different test, and if the test fails for one set of data, the others might not. And this helps pinpointing the data that are making the test to fail. This week I was adding...

Yet another ALT.net opinion

I wanted to write my opinion about the ALT.net thing since a long time, but I really never find the time to sit down and organize my ideas into an organic post.The event that "triggered" this post is my friend Lorenzo asking my opinion about his blog post "There are architect and Architects" (it's in Italian but here is the link to the auto-translated version by Google). In his post Lorenzo, commenting on Sam's post about leaving CodeBetter and ALT.NET, adds some thoughts about something that usually the hard-core ALT.NET people don't get: imagine you have an Enterprise-level project,...

How to use YUI JS Compressor inside a NAnt build script

As I anticipated yesterday, I implemented the YUI JS compressor inside Subtext's build process, and since it took me a while to understand how to specify the arguments for the NAnt <exec> task I wanted to share the snippet of the build file I created: <target name="JavaScript.minify"> <echo message="${filename}" /> <exec program="java" workingdir="${YUICompressor.dir}"> <arg value="-jar" /> <arg value="yuicompressor.jar" /> <arg value="-o" /> <arg value="${filename}.min" /> ...

CC.NET Monitor almost v1.0

In the last days I've been working on my Vista Sidebar Gadget with the intent to make it v1.0 before going back to Italy at the beginning of August. I'd like to make version 1 of my gadget a replacement for the CCTray application that ships with CruiseControl.NET: last month I silently released version 0.9 with the possibility to force a build on the server and now I'm trying to add the possibility to play a sound when a build breaks or, even better, launch a batch file. I'm also adding small enhancements to the UI, like the ones requested by...

CruiseControl.NET 1.3 released

I just got the announcement about the latest release of CruiseControl.NET 1.3. The new version is now build with NET 2.0, so it needs the NET 2.0 redistributable to run. The main feature are: support for integration queues to control build concurrency and manage dependencies between projects performance improvements in the web dashboard, especially for cctray polling via http ccnet has been migrated to .net 2.0 and now takes advantage of some of the features of .net 2.0 including switching the EmailPublisher to use SMTP support for the Accurev SCM For more details look at the release notes on...

Twitter Publisher for CC.NET

Thomas Freudenberg, an active blogger and CS MVP from Germany, just released a very useful CC.NET publisher task: Twitter publisher. I joined the Twitter band-wagon more or less one month ago, and I'm using Twitteroo to receive my "friends" notifications on the desktop, so I think it will be a good idea to receive a notification every time a build is triggered on the Subtext build server. I downloaded the publisher, installed it on Subtext build server, added 2 lines of configuration in the ccnet.config file and in 5 minutes I had the twitter publisher up and running. After you change the...

How to use the command line CodePlex Client

In the last days I've been working on a small tool that will be included inside BlogML, but I didn't want to install the Team Explorer since it's quite a big download for just a source control client (246Mb). So, while I wait June 18th for the deploy of the bridge that will allow access to CodePlex using any SVN client as TortoiseSVN, I decided to go the hard way and install the standalone command line tool: the CodePlexClient. Being a command line is a bit more complex to run, so here is quick step by step tutorial on how to install and use it. 1 -...

CCNET Monitor 0.9: now with Force Build

UPDATE: the latest version of the CC.NET Monitor Gadget for Vista Sidebar is v0.9.5: read more about it in 0.9.5 release notes. Since many people asked for it, I just released a new version of the CruiseControl.NET Monitoring Gadget for Vista Sidebar adding the most requested feature: the Force Build button. Now, in the undocked view, you can see a nice orange button on the right. Push that button to force a build for the project and the button will turn gray, meaning that the project is checking for updated or is already building. This the list of changes: ...

Are we all CI addicted?

Yesterday, after a few weeks not working on Subtext main trunk (busy with the CC.NET Monitor and the testing of the soon-to-be-released 1.9.5 version) I updated my local working folder from the SVN repository. And as soon as I opened the solution I got errors saying that a project was missing. I removed the project in my local solution, and then VS complained that some file were added to some projects, but were missing on the disk: somebody in the team probably added a new solution and a few files to the project, but only committed the project files, but...

CruiseControl.NET Monitoring Gadget for Vista Sidebar 0.8

UPDATE: The latest version of CC.NET Monitor for Vista Sidebar is v0.9.5: read more about it on the CC.NET Monitor for Vista Sidebar v0.9.5 release notes. A few days ago I announced the beta phase for version 0.8 of my CC.NET Monitoring gadget, and now I think it's ready for the release. Project opensourced on Google Code I also created to host the project on Google Code, so now I've a central repository to store the source code, the files released, the documentation and also a small issue tracking system. I already added 2 pages on the project wiki: CC.NET Monitor Features ...

CC.NET Monitor for Vista vNext

UPDATE: version 0.8 released: read more on CruiseControl.NET Monitoring Gadget for Vista Sidebar 0.8 Two weeks ago I released the first version of my CC.NET Monitor Gadget for Vista Sidebar, and I received a lot of feedbacks on what I should put into the next version of the gadget: the possibility to choose which projects to display, an automatic scrolling of the list of projects, a button to force the build on the server, a global indicator to be able to see at a glance if any of the projects are failing. So during the last weeks I worked on these feature...

Per-project Visual Studio Settings

Working on both "real", personal and opensource project sometimes I've to face the problem of managing different visual studio settings based on the project I'm working on. For my personal projects I like a certain tab and curly brace configuration, for Subtext I've to use another convention, and from my real job I've to use yet another configuration. After a few weeks of struggling I decided to adopt the Subtext settings even for my personal projects, but I cannot do it for my job, because that settings have been already used for years: so, every time I've to change type...

CC.NET Monitor for Vista Sidebar 0.7

UPDATE: the latest version of that gadget is now 0.9.5. Read more on the 0.9.5 release notes. I just released the new version of my CC.NET Monitor for Vista Sidebar (why is everybody giving such long names to software?): version number 0.7 This version adds the most requested feature: the ability to specify which project to display. Now in the settings page you can specify the "Display Mode": All projects Only failing projects Only specified projects All but the specified projects and then there is a text...

Tales of the development of CC.NET Monitor for Vista Sidebar

The CruiseControl.NET Monitor for Vista Sidebar is the first "real" Vista Sidebar gadget I developed, so I want to share 2 of the problems I encountered during the development. The first problem was that the XmlHttpRequest always returned "undefined" (which is the null in javascript) for its responseXML property. I was reading an xml file, why did I receive a null instead of the XML Document contained into the response? The XmlStatusReport.aspx file that contains the report for the build server doesn't have an xml content-type (not text/xml, application/xml or with a .xml extension) but has, as any other html page, a text/html content-type....

CC.NET Monitor for Vista Sidebar 0.6

UPDATE: The latest version of CC.NET Monitor for Vista Sidebar is v0.9.5: read more about it on the CC.NET Monitor for Vista Sidebar v0.9.5 release notes. Yesterday I released the first version (number 0.5) of my CC.NET Monitor for Vista Sidebar. But I forgot some debugging stuff in the release. So, in order to avoid confusion, I bumped up the version number to 0.6. Here is the new version: CC.NET Monitor for Vista Sidebar 0.6 Release notes: Removed an hard-coded url I used for debugging Removed the double cycle I used to test the scrolling of the gadget with more project Thank you to Thomas and Steve for reporting...

Vista Gadget for CruiseControl.NET - CC.NET Monitor for Vista Sidebar 0.5

UPDATE: The latest version of CC.NET Monitor for Vista Sidebar is v0.9.5: read more about it on the CC.NET Monitor for Vista Sidebar v0.9.5 release notes. I'm using CruiseControl.NET both at work and for Subtext, and since I'm using Vista I wanted to look at my servers states inside the Vista Sidebar. Last October Ruslan Trifonov built a Vista Sidebar Gadget for Cruise Control.NET, but I didn't like it mainly because it connects to a custom web service he built on purpose, instead of using the REST-like API provided inside CC.NET. So I decided to give the Vista Sidebar Gadget development a try, and I built...

Continuous Integration with The Simpsons™

As part of my new job as Chief Software Architect here in Calcium, one of my task is setting up a "state of the art" build/testing environment so that the various developers working on the project know if they broke something with their latest commit, or the exotic Java-.NET integration stopped working. I already setup a CC.NET build server (and I already wrote about something I did), but Continuous Integration is useless if nobody knows about the results of the builds in a timely way. We have all servers (both the build and the test server) in our office, so I installed CCTray on...

Easier editing of CruiseControl.NET config file with CCNetConfig

A few weeks ago I started using a nice utility that helps with the editing of CruiseControl.NET configuration files: CCNetConfig. The configuration file has some many options available, and each single plugin (for example source control, or different build tasks) has different options. So it's quite difficult to remember all the configuration options and going every time on the documentation can be quite time consuming. This is not an very sophisticated application, but it's very powerful and effective in its simplicity: it's based on the property grid control available inside the Windows.Form assembly. And there a lot of rules...

Synchronize assembly version with CC.NET build number with NAnt

In the last month I started working again a lot on CruiseControl and build processes. Another quick tip I think it's interesting to share is how to have the version number of the code you are building synchronized with the build number generated by CruiseControl.NET. As everything related to build processes inside CC.NET this is achieved using a NAnt task: asminfo. Step 1 - CC.NET Labeler The first thing you have to setup is the labeler inside the ccnet.config file: <labeller type="defaultlabeller"> <prefix>2.2.0.</prefix> <incrementOnFailure>False</incrementOnFailure> </labeller> This will instruct CC.NET to prefix the build label with the major.minor.revision of your...

Change config file with NAnt

A quite common task during the build process of an application is to change the configuration file with settings specific to test in on the testing environment or to release the product to customers. NAnt has task that allow this: it can change the value of any attribute inside any XML file. You just need to be fluent with XPath in order to get the correct value to change. <xmlpoke file="${testing.dir}\web.config" xpath="/configuration/appSettings/add[@key = 'ServerId']/@value" value="CODECLIMBER"> </xmlpoke> This snippet include some example values: just change ServerId to setting key you want to change and...