• ASP.NET MVC,  Continuous Integration,  DotNet,  MSBuild

    Vanilla build server and a little NuGet gem

    Vanilla build server is a concept that says that the build server should have as few dependencies as possible. It should be like vanilla ice cream without any raisins (I have raisins in ice cream). Let me cite the classic (from: Continuous Integration in .NET): “It’s strongly suggested that you dedicate a separate machine to act as the CI server. Why? Because a correctly created CI process should have as few dependencies as possible. This means your machine should be as vanilla as possible. For a .NET setup, it’s best to have only the operating system, the .NET framework, and probably the source control client. Some CI servers also need…

  • Continuous Integration,  DotNet,  MSBuild

    Visual Studio 2010 Professional and Hudson / Jenkins CI and FxCop

      Visual Studio 2010 Premium and Ultimate do have the code analysis feature build in. What this feature does is static code analysis of your source code (or IL to be specific). Unfortunately the Professional edition lacks the build in integration (no Analysis tab in the project properties). Here is a way to easily integrate Visual Studio 2010 Professional with FxCop. FxCop is a standalone Code Analysis version that comes together with “Microsoft Windows SDK for Windows 7 and .NET Framework 4 Version 7.1”. Actually if you download and install the SDK you will get the FxCop installer in %ProgramFiles%\Microsoft SDKs\Windows\v7.1\Bin\FXCop. You will have to install it from there (yeah…

  • Continuous Integration,  MSBuild

    Writing MSBuild Custom Task

    Scenario: we have Subversion server to manage our source code and a build server (CruiseControl.NET) to manage our deployment. We have decided to automatically set the SVN revision number to our assembly version. [assembly: System.Reflection.AssemblyVersion("")] [assembly: System.Reflection.AssemblyFileVersion("")] So we will replace the last 0 with the current Subversion revision number. How to do this? One way to achieve this is to modify the AssemblyInfo.cs and read the modified number from that exists. The file modification is easy with MSBuild Community Task FileUpdate <FileUpdate Files="Cic.P001001PropertiesAssemblyInfo.cs" Regex="(d+).(d+).(d+).(d+)" ReplacementText="$1.$2.$3.$(RevisionNumber)" /> But how to read it back? Well there is no easy way. I have written a custom MSBuidl task to achieve this like…

  • MSBuild,  Vista Sidebar Gadget

    Developing Vista Sidebar Gadget with Script#

    C# to JavaScript compiler? What? Jea! I thought the same way. It’s amazing what smart people can invent. My men is Nikhil Kothari with his Script#. What do I need the C# to JavaScript compiler for, you ask. Is IL not enough? Well think of enriching your ASP.NET web sites with JavaScript written in C#. Or using Ajax with scripts written in Visual Studio with Intelisense and refactoring. Or developing the Vista Sidebar Gadgets without writing a single line of code in Javascript! I instantly lookd at the third possibility. since I have Vista on board I was thinking about writing my own Sidebar Gadget (you know the little programs…

  • Continuous Integration,  MSBuild

    Continuous Integration article in SDJ

    I would like to invite all my polish speaking readers to online version of my article about continuous integration in .NET. It was published in July 2007 in Software Developers Journal. You can find it in the download section of SDJ web page. You can read there about: setting up CI server with CruiseControl.NET creating one click build script with MSBuild incorporating unit testing and code coverage into CI process using WebDashboard and CCTray to control the process introducing code analyze with FxCop creating install file and deploying the project.