Hi Guys,
I had a look at getting ccnet to build under mono / ubuntu. Am I right in thinking that this is something that's not expected to work out of the box at the moment, but that has worked to some extent in the past?
I don't know if people have come across
vagrant. I think that this would be a good way of us sharing a consistent linux environment for work on improving mono compatibility. The workflow would be something like:
Initial setup:
- Install vagrant and virtualbox on your development machine
Then:
- cd into the CruiseControl.Net directory
- run vagrant up
- This will create and provision a virtual machine according to a Vagrantfile which we'd have checked into source control
- I think this can just be a plain ubuntu machine with mono-devel installed
- vagrant ssh to connect to the VM
- run the build / tests
There's
a vagrant branch on my github fork which contains some initial hacking about.
Here's a quick summary of my attempts to get it to build under that linux VM:
- I had some problems with NAnt picking the wrong version of xbuild, so for now I've been ignoring NAnt and running xbuild directly.
- Running:
xbuild project/ccnet.sln /property:DISABLE_JSCRIPT=true /property:DISABLE_COM=true
Nearly worked, but there were a couple of windows-specific BuildEvents which failed. - I added conditionals to the projects that use windows CMD in build events with unix alternatives (see aa65c88 and 10dd702)
- The build got a bit further this time, but the Visual Basic demo still failed. I removed that from the solution file since I don't think mono deals with VB all that well.
- This seems to have fixed the build!
- I tried to run mono Build/Server/ccnet.exe but this crashed immediately (see [0] below)
- CCCmd seems to run ok (at least, it displays the help text without crashing :-)
- The web dashboard appears to run fine with xsp --nonstop
So, all in all a fairly promising start.
One problem with the vagrant approach is that it isn't GUI friendly, so I haven't been able to debug with the usual tools. I'll need to have a think about how best to investigate. I don't suppose anyone has any ideas on the error?
Cheers,
Rich
0: vagrant@packer-virtualbox-iso:/vagrant$ mono Build/Server/ccnet.exe
CruiseControl.NET Server 0.0.0.0 -- .NET Continuous Integration Server
Copyright © 2003 - 2014 ThoughtWorks Inc. All Rights Reserved.
.NET Runtime Version: 4.0.30319.17020 [Mono] Image Runtime Version: v4.0.30319
OS Version: Unix 3.13.0.24 Server locale: en-US
log4net:ERROR XmlHierarchyConfigurator: Could not create Appender [Console] of type [log4net.Appender.ColoredConsoleAppender]. Reported error follows.
System.EntryPointNotFoundException: GetConsoleOutputCP
at (wrapper managed-to-native) log4net.Appender.ColoredConsoleAppender:GetConsoleOutputCP ()
at log4net.Appender.ColoredConsoleAppender.ActivateOptions () [0x00000] in <filename unknown>:0
at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender (System.Xml.XmlElement appenderElement) [0x00000] in <filename unknown>:0
log4net:ERROR XmlHierarchyConfigurator: Appender named [Console] not found.
An unexpected error has caused the console to crash, please press any key to continue...