Last month the Antlib has been promoted to an official subproject of Ant, Steve and Conor are now committers to it as well. We still need to update the site, though. Gump builds it nightly and runs the tests (well, only the ones for dotnetexec) on Mono.

I finally found some time to try MSBuild and immediately found that the task didn't work (the argument is /target not /targets). Well, now it does:

$ cat test.xml
<project xmlns:dn="antlib:org.apache.ant.dotnet">
  <dn:msbuild>
    <build>
      <Message Text="Hello world"
        xmlns="http://schemas.microsoft.com/developer/msbuild/2003"/>
    </build>
  </dn:msbuild>
</project>

$ ant -lib build/lib -f test.xml
Buildfile: test.xml
[dn:msbuild] Microsoft (R) Build Engine Version 2.0.50727.42
[dn:msbuild] [Microsoft .NET Framework, Version 2.0.50727.42]
[dn:msbuild] Copyright (C) Microsoft Corporation 2005. All rights reserved.

[dn:msbuild] Build started 15.12.2005 20:21:56.
[dn:msbuild] __________________________________________________
[dn:msbuild] Project "c:\Dokumente und Einstellungen\stefan.bodewig\Lokale Einstellungen\Temp\build1543310185.xml" (default targets):

[dn:msbuild] Target generated-by-ant:
[dn:msbuild]     Hello world

[dn:msbuild] Build succeeded.
[dn:msbuild]     0 Warning(s)
[dn:msbuild]     0 Error(s)

[dn:msbuild] Time Elapsed 00:00:00.10

BUILD SUCCESSFUL
Total time: 0 seconds

This means, the MSBuild task now sort of officially works, I've updated the snapshot at http://people.apache.org/~bodewig/dotnet/ and also provide a special version for Ant 1.6.x that is minimally limited as it won't support build snippets nested into the MSBuild task.

In fact, the "most recent" version I've uploaded will require a version of Ant's svn trunk not older than a few minutes since I had to teach Ant's DOMElementWriter some new tricks to make it support XML namespaces.

Those snapshots are only temporary, I'll come up with a release plan rather soon.

After my tests today, the NAnt, NUnit and dotnetexec tasks work reasonably well on Mono (tested on Linux and MacOS X) and Microsoft's .NET frameworks 1.1 and 2.0 - MSBuild requires Microsoft's 2.0. They could certainly use some more testing.

path: /en/Apache/Ant/dotnet | #