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.


Jul 24 2009

IronRuby with XBuild

Category: Mono, xbuildankitj @ 2:04 am

I found a mailing list post saying that IronRuby doesn’t build with xbuild (mono’s implementation of msbuild). So, I decided to give it a shot with latest xbuild. I tried the git repo git://github.com/ironruby/ironruby.git with mono 2.4.2.1, and after a few minor filename casing changes, it builds successfully !

jredville confirmed that the built binaries pass their language test suite :)

The patch is being reviewed by cj and jredville at #ironruby/freenode.

To try it yourself, apply the patch, and build as:
$ cd ironruby/Merlin/Main/Languages/Ruby
$ xbuild Ruby.sln /p:TreatWarningsAsErrors=false

The binaries are in “ironruby/Merlin/Main/Bin/Debug”.
$ mono ir.exe
:)


Jun 30 2007

Integrating Vim with MonoDevelop

Category: Monoankitj @ 8:38 pm

This week was Hack Week at Novell. My idea for the hack week was to Integrate Vim with MonoDevelop. Not just as an external editor used by MD to open files, but integration, so MD should be aware of changes being done via vim and vim should respond to various commands from MD.

Current implementation status is that you can see gvim in monodevelop, i have two way communication mostly setup. The class and method combos above the editor respond to cursor changes in vim, and selecting a class/method from the combos makes vim jump to the correct position. It supports code completion (yay!). Vim gets the code completion info from monodevelop.

But there are problems. Vim has some bugs which hinder some stuff, so next I’ll try to fix those bugs in vim. Its not really distributable right now, but it should be soon. I’m not sure whether a lot of people would be interested in this or what all features would be desirable, so feel free to give feedback. Here is a small demo of what is available right now:

This is just a quick post, I’ll post one with more details soon. If you like the project then please vote here.


Feb 22 2007

Some MonoDevelop hacking!

Category: Monoankitj @ 3:40 am

I’ve been hacking on MonoDevelop for some time now. Next release would be the first one for me :-) Thanks to all the people who’ve been helping me out!

I mainly contributed (with lots of help from lluis) on two features for this release :

Native support for VS2005 Projects

MonoDevelop now has native support for Visual Studio 2005 solutions/projects in the prj2make addin. You can directly load VS2005 solutions/projects and work with them. Any changes made are written back to the project files. So you can effectively share the same project files between VS2005 and MonoDevelop. This has been in svn for a while now.

Thanks to all the people helping out with the testing :) Its not complete yet, needs more testing. Am eager to get feedback and bug reports on this ;)

Currently it supports loading C# (.csproj) and VB.NET (.vbproj) projects. The support is not msbuild based, so things like custom msbuild tasks won’t work. But Marek Sieradzki already has a draft patch to add support for using msbuild!

Integration with Makefiles

MonoDevelop now supports integration with Makefiles for projects. This integration covers the following features:

  • Delegating build, clean and/or execute operations to Makefiles
  • Keeping the monodevelop project in sync with the Makefile wrt:
    • List of files (code, resources, deployable files and others).
    • List of references (only for .NET projects).

MonoDevelop itself uses this for keeping its project files and Makefiles in sync.

500px-capturamakefileintegration.png

The release notes for the next release will have more details :)