Boo and MSBuild

Msbuild is microsofts answer to Ant. This is a build tool for the .Net Platform.

It has the minor benfit of being the native file format of the Visual Studio 2005 project files.

You need the .Net Framework 2 installed and to add the Microsoft Framework to your path statement

Boo is a lightweight .Net language.

Here is a sample that gets a task written in Boo for msbuild:

=== ===

import Microsoft.Build.Framework
import Microsoft.Build.Utilities
import Boo.Lang

class MyTask(Task):
public override def Execute():
return true

private _MyProperty as string

MyProperty as string:
return _MyProperty
_MyProperty = value

=== Test.proj ===

<Project xmlns="" 

<Target Name="BuildMyTask">
<Exec command="booc -t:library"/>

<UsingTask TaskName="MyTask" AssemblyFile="MyTask.dll"/>

<Target Name="MyTarget">
<MyTask MyProperty="Hello!"/>


You also need Boo installed (and on your path).
Copy Boo.Lang into the directory that you created these scripts in.

At the command line type: msbuild
This will build and run the minimal boo task.
I am planning to add a real msbuild task for boo.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s