Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!
.NET Zone is brought to you in partnership with:

C# ASP.NET developer who works with MVC but is sometimes known to dabble with WebForms. Passionate coder who cares about his craft. Has a real want to create clean, readable and maintainable code. Obsessed with CI and its effects on a good development team. Pushing the bounds of continuous delivery and studying the advantages it brings to developers. Paul is a DZone MVB and is not an employee of DZone and has posted 22 posts at DZone. View Full User Profile

TeamCitySharp now builds with Mono

02.11.2012
Email
Views: 1300
  • submit to reddit
The .NET Zone is presented by JNBridge and VaraLogix to keep you updated on all the latest news, tips, and tools in the .NET community.  Check out today's top .NET content and read about JNBridge's innovative tools for .NET and Java interoperability and VaraLogix's deployment automation and CM utilities plus their best practices.

I am pleased to be able to say that TeamCitySharp is now supports mono. In order to get the project supported I had to change a few parts of the system.

Up until now, each project within the solution has a “BeforeBuild” event that downloaded the nuget packages needed to build the solution. This was in place to keep the github repository small enough to facilitate a fast download for people who fork it. Nuget doesn’t work with mono so there was a trade off I had to make. In this instance I chose supporting mono over the “BeforeBuild” event. This does mean that once the repository is cloned or forked. then it will work instantly. I hope to revisit this if / when someone manages to get nuget working with mono.

The sample build monitor was a standard ASP.NET MVC 3 project. I found that this didn’t build with mono out of the box. It was throwing errors due to the references contained. The following references were present:

before

On running a reference analysis, I was able to see that the following references were not used:

ToRemove

This meant that only the core references were left behind. This meant that the entire solution was able to build under mono.

In order to build the project with mono, you can run the following command:
xbuild TeamCitySharp.sln

References
Published at DZone with permission of Paul Stack, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

This content was brought to you in partnership with JNBridge and VaraLogix JNBridge specializes in .NET and Java interoperability while VaraLogix empowers developers and IT operations with an all-in-one deployment and CM product.  Be sure to view JNBridge's brief video series on accessing Java from .NET and see VaraLogix's tips for taking the risk out of .NET deployment.