Wednesday, June 30, 2010

IZWebFileManager 2.5.4 release is out

I am very happy to announce that IZWebFileManager 2.5.4 has been released.

From now (and forever) it supports Chrome, Safari and Opera browsers.
You are welcome to try it using online demo:

The release is available for download from Google Code


Wednesday, June 2, 2010

Build .NET Project with NAnt

Since NAnt comes with NAnt 0.90 release I was interested to use it with my project IZWebFileManage.

At first look it is powerful tool allows me easy to build project, run tests and package release.

The first task was"build" of course.

For such purpose NAnt offers <csc> task, but using this task I have to declare output type, list of source files, resources etc. It is quite good if you are using Notepad or any other (not Visual Studio) IDE, but I (and I believe most of .NET developers) use Visual Studio and have *.csproj file.

Is there a way to build VS project with NAnt? Yes, you may find it in NAntContrib. It provides <msbuild> task. But problem is that NAntContrib is quite out of date. The last release is on 2006/10/15 and I am not sure it supports NAnt 0.90 and VS 2008

Is there alternative way to build *.csproj? Yes - msbuild command line!
NAnt has <exec> task which run any command line you want.

There is my file:

<?xml version="1.0" ?>
<project name="IZWebFileManager" default="build"

<property name="project.config" value="Debug" />

<target name="clean">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline='/t:Clean /p:Configuration=${project.config} /p:Platform="AnyCPU" /v:n'
workingdir="." />

<target name="version">

<target name="build" depends="clean, version">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline='/t:Build /p:Configuration=${project.config} /p:Platform="AnyCPU" /v:n'
workingdir="." />


I place file near to *.csproj file and msbuild find it by default, so there is no need to mention name of project file explicitly.

Run build using command line:

>nant build

P.S. After a while I figured out <solution> task. Looks like that is what I need to run msbuild with NAnt. I will discover it...