Oct 12 2009

xbuild update

Category: Mono, xbuildankitj @ 2:11 pm

Small xbuild update:

Better error reporting. Earlier, xbuild didn’t correctly show the filename if the source for the error was not the main project file. Like, if the error was from Microsoft.Common.targets . Now, it should report this correctly. But real improvement is that the end of the build instead of showing a dump of errors and warnings like:


Banshee.Collection/TrackInfo.cs(623,57): warning CS0078: The 'l' suffix is easily confused with the digit '1' (use 'L' for clarity)
: warning : Found a conflict between : 'Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and 'Mono.Data.Sqlite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using 'Mono.Data.Sqlite,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' reference.

.. which doesn’t tell which projects those warnings belong to. For solutions with lot of projects, this becomes a major issue. So, xbuild now gives better info (like msbuild):


/other/banshee/Banshee.sln (default targets) ->
(Build target) ->
/other/banshee/src/Core/Banshee.Core/Banshee.Core.csproj (default targets) ->
(CoreCompile target) ->
Banshee.Collection/TrackInfo.cs(623,57): warning CS0078: The 'l' suffix is easily confused with the digit '1' (use 'L' for clarity)
Banshee.Collection/TrackInfo.cs(623,57): warning CS0078: The 'l' suffix is easily confused with the digit '1' (use 'L' for clarity)


/other/banshee/Banshee.sln (default targets) ->
(Build target) ->
/other/banshee/src/Core/Banshee.Services/Banshee.Services.csproj (default targets) ->
(ResolveAssemblyReferences target) ->
/home/radical/w1/misc/lib/mono/2.0/Microsoft.Common.targets: warning : Found a conflict between : 'Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' and 'Mono.Data.Sqlite, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using 'Mono.Data.Sqlite, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' reference.

The other update is that xbuild now emits errors/warnings in color! So, instead of :

old xbuild output

.. now you have this:

xbuild output in color

You can use the environment variable XBUILD_COLORS to change the default colors. You can use it as:

XBUILD_COLORS=errors=red,warnings=green,messages=brightblue,events=yellow

Or set to “disable” to disable colors. See man page for more details.

Thats all for now ;)


Oct 08 2009

xbuild and MonoDevelop

Category: Mono, xbuildankitj @ 11:19 pm

xbuild (trunk) can now build MonoDevelop (trunk) !! :D

~/monodevelop> xbuild main/Main.sln

I’ve only tried the “Main.sln”, not the “extras”, as yet!

If you’re using or trying to use xbuild, then please fill this short survey


Oct 02 2009

A small xbuild survey

Category: Mono, xbuildankitj @ 11:22 pm

This is a survey to get an idea of which all projects currently work with xbuild. And those that don’t, what might be blocking them.

This can help me prioritize xbuild features and bug fixes. Please take a few mins to fill the survey.

Update: Fixed the survey link!
Update2: Really fixed this time!


Oct 02 2009

xbuild and Mono 2.6p1

Category: Mono, xbuildankitj @ 12:45 am

The first preview of Mono 2.6 has been released here. This has a much improved version of xbuild.

Major new features since Mono 2.4:

  • Solution file support
  • ASP.NET project support, both WebApplication and WebSite projects
  • It can now resolve references from pkg-config files (eg. gtk-sharp.pc)
  • Pre/PostBuildEvents are supported
  • Before/After* hooks and *DependsOn properties have been added for various targets like Build/Clean, to allow extending them

You can see the full release notes for xbuild here.

So, effectively, you can use xbuild to build your VS2005/VS2008 solutions and projects. C# and VB.NET projects are supported out of the box. It supports the usual stuff like embedded resources, satellite assemblies, project references etc. Some opensource projects that work fine with xbuild : IronRuby, IronPython, OpenTK, etc.
Note: Multi-targeting is not implemented yet, but it should be available in the next preview release.

There might some windowism’s that might hinder things, for which you should see Porting MSBuild projects to xbuild. Feedback is welcome on improving that page.

Custom tasks and targets should work with xbuild. Not every api that your custom task might be using would have been implemented, so file a bug incase it is not.

So, this is an excellent time to try out your msbuild project with xbuild and help make it better :) File bugs here. Any kind of feedback on xbuild, positive/negative, is very welcome!

The wiki page Microsoft.Build has been updated with the current xbuild status.

Update: Short xbuild survey.