Archive for May, 2008

Folder wildcards like \**\ in CruiseControl.Net

Spanish Version

Last week we were working on our Build Server using CruiseControl.Net to allow multiple Test / Code Coverage tasks for two or more solutions.

Once we’ve configured the .proj file to run a set of two RunTests / RunCodeCoverage tasks we needed to merge the results file to the MSBuild log after running them.

So, our first approach was modifying the ccnet.config file to merge the files generated by these tasks using the same pattern of MSBuild, I mean, using "\**\", something like this:

<merge>
  <files>
    <file>D:\srv\ccnet\logs\project\**\*.trx</file>
    <file>D:\srv\ccnet\logs\project\**\*.cvg</file>
  </files>
</merge>

At this point, we have figured out that Cruise Control .Net does not have this functionality, only it allows to run something like D:\srv\ccnet\logs\project\theProject\*.trx, and since the CruiseControl.Net source code is available I started to writing some lines to modify the ThoughtWorks.CruiseControl.Core assembly to allow that.

In this post you will find the source code of the spike I wrote with a series of tests to implement that feature and the WildCardPath.cs source code from the core CruiseControl.Net project updated.

  • Spike solution with tests [Download]
  • WildCardPath class file of CruiseControl.Net Core assembly [Download]

Once you have updated the Core project with the new implementation of the WildCardPath class, you need to do the following tasks to keep it running.

  1. Compile the Core project
  2. Stop the CruiseControl.Net service
  3. Replace the ThoughtWorks.CruiseControl.Core assembly with the new one.

And that’s it, use wildcards as in MSBuild :)

Microsoft Source Analysis for C# 4.2 was published

Spanish Version

Microsoft has published a great tool called Microsoft Source Analysis for C#, formerly known as StyleCop.

This tool allow us to review and improve our source code quality. It’s is fully integrated with Visual Studio, so with a single right click in a solution, project or file, we can check our code against the best practices defined in a series of rules depicted below.

You will find a detailed explanation on the Announcing the release of Microsoft Source Analysis for C# post and download the latest bits from here.

 

Also you can customize which rules should be checked using the built-in configuration tool.

Finally, another good point is that we can integrate that tool on our build process with MSBuild. I recomend you the Jason Allor’s blog post on the Source Analysis Blog page where he explains how to do that.

Here is another good post from MSBuild Team Blog also, announcing this release.

Enjoy it and say goodbye to the documents with code-standards :)

ASP.Net MVC Online Conference on MSDN

Spanish Version

On Tuesday (May 11, 2008) Matias Woloski and I, gave a webcast about the ASP.Net MVC framework for the Spanish community.

I want to thank you for attend this talk and I hope we continue giving more talks about latest technologies with Microsoft.

As I promised you, in this post you will find the some source code different versions for the sample application we showed during the demo:

  • Translator Demo [MVC Preview 2 (original)] : Download
  • Translator Demo [MVC Preview 2 + TDD (using MoQ) + WCF Services] : Download
  • Translator Demo [MVC Preview 3 + TDD (using MoQ) + WCF Services] : Download

I hope you find these samples useful and I you have any question, please let me know by posting a comment right here.

If you want to know more about the changes on the Preview 3, I recommend you to take a look at this ScottGu's post http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx