01/12/06
This tutorial is about NAnt, a free .NET build tool. It also deals with the integration of NAnt in Visual Studio 2005.
1. Installation
Please find here the steps to install NAnt:
- Download NAnt
- Unzip the zip file in c:\Program Files\NAnt
- Add the c:\Program Files\NAnt path in your PATH environment variable
- Create a HelloNAnt.build file somewhere on your hard disk with the following content:
<?xml version="1.0"?> <project name="Hello World" default="hello"> <target name="hello"> <echo>Hello</echo> </target> </project> Go in the directory where you have put this file, open a Command Prompt and type NAnt.
You should have the following display:
NAnt 0.85 (Build 0.85.1869.0; rc2; 12/02/2005) Copyright (C) 2001-2005 Gerry Shaw http://nant.sourceforge.net Buildfile: file:///C:/My Documents/HelloNAnt.build Target framework: Microsoft .NET Framework 1.1 Target(s) specified: hello hello: [echo] Hello BUILD SUCCEEDED Total time: 0 seconds.
2. Integration of NAnt in Visual Studio 2005
- Create a solution for a console application named "Application" (this application displays "Hello World" on the console).
- Create a Application.build file with the same content as the previous one (using notepad by instance)
- In the solution explorer, click on the "Show All Files" icon
- Right-click on Application.build and choose "Include In Project"
- Now you must say that .build files are XML files using the following menu: Tools > Options > Text Editor > File Extension. Associate ".build" extension with XML Editor.
6 comments
Permalink
05/20/06 @ 09:34
Permalink
08/24/06 @ 05:33
Permalink
12/04/06 @ 09:07
Permalink
12/04/06 @ 09:41
Permalink
12/06/06 @ 15:51
Permalink
09/20/07 @ 10:23
Comments:
Comment from: ochekroun [Visitor] · http://sourceforge.net/projects/nantaddin
You can also use the NAnt addin for Visual Studio.
Thanks,
Its really very nice tutorial that cover
a easy script building example , There should be some example related to this,
It will be useful to bignners.
Thanks again
Its really very nice tutorial that cover
a easy script building example , There should be some example related to this,
It will be useful to bignners.
Thanks again
Comment from: Cosimo Carbonelli [Visitor]
· http://www.otherbit.com/modules/blog/BlogContent.aspx?blogID=4
OK, but how do you compile a solution
made with Visual Studio 2005 ? The task "solution" works only with Visual
Studio 2003 solutions...
made with Visual Studio 2005 ? The task "solution" works only with Visual
Studio 2003 solutions...
Comment from: Serge Baccou [Member]
· http://www.baccoubonneville.com
For Visual Studio 2005, you'd better use MS-Build if possible.
Comment from: Cosimo Carbonelli [Visitor]
· http://www.otherbit.com/modules/blog/BlogContent.aspx?blogID=4
OK, in effects, I'd tried this option
and it seems to be the best...
thanks
and it seems to be the best...
thanks
Hi,
i'm building a set of cs files which will generate dll file when build is succeeded. along
with this i want to copy a file into the same location where the dll has been generated.
How can i go about with this?
i'm building a set of cs files which will generate dll file when build is succeeded. along
with this i want to copy a file into the same location where the dll has been generated.
How can i go about with this?
Leave a comment:
Pingbacks:
No Pingbacks for this post yet...
NAnt tutorial -
Categories: