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 ;)

Leave a Reply