Speaking about continuous integration
January 16, 2010 on 7:09 pm | In Continuous Integration, DotNet | No Comments
I will be speaking on Wednesday (20.01.2010) in Krakow, Poland at the Karkow .NET Developers Group meeting. The session is about Continuous Integration in .NET. So if you like hear what I have to say about CI meet me at ABB ISDC, Pałac Pugetow, ul. Starowislna 13, Krakow at 18:30. I believe the attendance is free but registration is required. See you in Krakow!
Selenium RC and FitNesse as a service on Windows Server 2008
November 7, 2009 on 10:19 pm | In Windows, Continuous Integration, DotNet | No CommentsIf you are working in a team or running a continuous integration process the most comfortable way to run tools like Selenum RC Server or FitNesse is to install them as a windows service. I was doing this earlier on my old Windows Server 2003 by issuing the instsrv.exe (to install a service) on srvany.exe (to run anything) - both from Windows Resource Kit. I had to edit the registry to provide what exactly do I wanted to run (java –jar selenium-server.jar or java –jar fitnesse.jar).
But there is no Windows Resource Kit for 2008. You might use the sc.exe and get the old srvany.exe (with compatibility issues according to Microsoft itself). It would work but why bother when there is a Non-Sucking Service Manager! All you have to do to install a service with this tool is to download it, issue a
nssm.exe install SeleniumRC
and edit this dialog box:
Click Install service and you are done. Selenium RC Server is installed. All you have to do is to start it. Voila!
How to make CruiseControl.NET accept SSL certificate under Windows Server 2008?
October 24, 2009 on 11:44 pm | In Windows, Continuous Integration, DotNet | No CommentsIf you are running CruiseControl.NET under the Local System account and your SVN server certificate was issued by yourself (or by VisualSVN Server) you will quickly run into trouble. Normally if you run any command on your repository you will get this information:
C:\Program Files\svn\bin>svn log https://your_server/svn/your_repository/trunk –username username –password password
Error validating server certificate for ‘https://your_server:443′:
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- The certificate hostname does not match.
Certificate information:
- Hostname: your_server
- Valid: from Sat, 26 Sep 2009 17:24:27 GMT until Tue, 24 Sep 2019 17:24:27 GMT
- Issuer: your_server
- Fingerprint: 24:8e:f6:ba:c7:a6:3f:69:32:c0:21:92:64:44:62:fe:2c:bb:b4:69
(R)eject, accept (t)emporarily or accept (p)ermanently?
If you accept you will not be bothered again. But CCNet works as a Windows Service. There is no one to make the decision. How to deal with this issue. Well earlier it was easy enough. You had to use one of the security holes and start cmd.exe in interactive mode wit at command (look here for more details). But with Windows Server 2008 it is not possible you will simply get this:
C:\Users\Administrator>time
The current time is: 23:31:11.59
Enter the new time:
C:\Users\Administrator>at 22:32 /interactive cmd.exe
Warning: Due to security enhancements, this task will run at the time
expected but not interactively.
Use schtasks.exe utility if interactive task is required (’schtasks /?’
for details).
Added a new job with job ID = 1
How to deal with this. There is very easy solution. Set the CruiseContril.NET service “Allow to interact with desktop” flag (Start –> Control Panel –> Administrative Tools –> Services –CruiseControl.NET) like this
Restart the service and wait a while for this windows to appear:
Select show me the message.
Voila! You have command line as Local System user available. You can now issue the
C:\Program Files\svn\bin>svn log https://your_server/svn/your_repository/trunk –username username –password password
command and accept the SSL certificate permanently.

From this time on you CCNet server will not have any problems with accessing your secured repository.
Buy Continuous Integration in .NET book
October 19, 2009 on 7:52 am | In Continuous Integration, Books, DotNet | 2 CommentsThe Continuous Integration in .NET book is available as an early access edition from MEAP. For those of you that are not familiar with MEAP it stands for Manning Early Access Program and it is the place where you can download a free chapter and buy the whole book printed or as an ebook before it gets published. You will get continuously chapter after chapter successively as they will be written.
Next big thing – continuous integration book
August 14, 2009 on 9:39 pm | In Continuous Integration, Books, DotNet | 3 Comments
I’m going to write a book about Continuous Integration in .NET for the Manning Publications. I’m sure I don’t have to tell you how exited am I. I will join the noble team of Manning authors like John Skeet, Ayende Rahien or Roy Osherove. I’ll keep you posted about the progress. In the mean time let me give you some history.
I’ve once written an article for Software Developers Journal about Continuous Integration in .NET. It was very well received. I always thought I have a lot more to say in this topic. The idea to write a book came while speaking with my good friend hsd (well I have more and more to thank you for :). I’ve tried to propose the book to a polish publisher Helion. Very fortunately for me they said there is not enough place on the polish marketplace to get enough sell (I’ve blogged about this in polish). I presume they know better. I’ve already buried the idea about the book when I saw the ASP.NET MVC 1.0 Quickly book from Packt Publication. It was written by a guy from Belgium (Maarten Balliauw). I’ve read his blog and I realized has not native English speaker. “If he can, why not to try myself?” I thought and written a short proposal for Packt. They were interested! I’ve worked on the proposal with the Acquisition Editor and I’ve shortly after that I’ve got the information that the book was “committed”. I was very, very happy until something went wrong at Packt (the went scared by a download stats of one of the tools I wanted to write about). The book was “uncommitted” and we didn’t sign the agreement. I don’t throw my hands up! I thought if they are interested probably someone else will be too. I’ve send view more proposals to other publishers and the Manning appeared. In the mean time Packt turned to be after all interested in me writing the book. The Acquisition Editor at Packt Publishing was a great guy. I’m sure it would be great to write a book for them but it was to late. Manning found me a co-writer Craig Berntson. Someone that speaks English a lot better than I and has a know how in continuous integration. The way the Manning deals with his authors seems very provisional and I’ve very glad to get this opportunity.
So be aware. The best Continuous Integration in .NET book comes sooner than you expected!
Writing MSBuild Custom Task
March 13, 2008 on 8:16 pm | In MSBuild, Continuous Integration, DotNet | 9 CommentsScenario: 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(“1.2.3.0″)] [assembly: System.Reflection.AssemblyFileVersion(“1.2.3.0″)]
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 this:
<AssemblyInfoReader Path=“PropertiesAssemblyInfo.cs” Property=“AssemblyVersion“> <Output TaskParameter=“Value” ItemName=“ApplicationVersion” /> </AssemblyInfoReader>
Writing a custom MSBuild task is fairly easy. You have to Reference Microsoft.Build.Framework and Microsoft.Build.Utilities and implement Microsoft.Build.Framework.ITask. Just like this:
namespace Cic.MsBuildTasks { public class AssemblyInfoReader : Microsoft.Build.Framework.ITask { #region Private Varaibels private string path; private string property; private string value; #endregion #region Fields [Microsoft.Build.Framework.Required] public string Path { get { return path; } set { path = value; } } [Microsoft.Build.Framework.Required] public string Property { get { return property; } set { property = value; } } [Microsoft.Build.Framework.Output] public string Value { get { return this.value; } set { this.value = value; } } #endregion #region ITask Members private Microsoft.Build.Framework.IBuildEngine engine; Microsoft.Build.Framework.IBuildEngine Microsoft.Build.Framework.ITask.BuildEngine { get { return engine; } set { engine = value; } } bool Microsoft.Build.Framework.ITask.Execute() { string message; value = string.Empty; try { value = MyReadAssemblyInfoProperty(); message = string.Format( “AssemblyInfo property {0} read. Property value {1}”, property, value); } catch (System.Exception e) { message = string.Format( “Error reading AssemblyInfo property {0}. Error: {1}”, property, e.Message); } Microsoft.Build.Framework.BuildMessageEventArgs args = new Microsoft.Build.Framework.BuildMessageEventArgs( message, string.Empty, “AssemblyInfoReaderTask”, Microsoft.Build.Framework.MessageImportance.Normal); engine.LogMessageEvent(args); return true; } private Microsoft.Build.Framework.ITaskHost host; Microsoft.Build.Framework.ITaskHost Microsoft.Build.Framework.ITask.HostObject { get { return host; } set { host = value; } } #endregion #region Internals private string MyReadAssemblyInfoProperty() { string propertyValue; // Eraly return if (!System.IO.File.Exists(path)) return “”; foreach (string line in System.IO.File.ReadAllLines(path)) { if (line.Contains(property)) { try { propertyValue = line.Remove(0, line.IndexOf(‘”‘) + 1); propertyValue = propertyValue.Remove( propertyValue.LastIndexOf(‘”‘), propertyValue.Length - propertyValue.LastIndexOf(‘”‘)); // return matching property value return propertyValue; } catch { // Ignore errors } } } return string.Empty; } #endregion } }
Continuous Integration article in SDJ
September 3, 2007 on 7:24 pm | In MSBuild, Continuous Integration, DotNet | No CommentsI 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.
Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^


