nant

NAnt script for running multiple test assemblies

Hi Guys. I'm just getting into TDD, and from looking around, the general concensis seems to be to have a one to one mapping from a code project to a test project. My question is, if you follow this route, and have multiple test assemblies, what is the best way to run these as part of an NAnt script? If it makes a difference, I am using ...

How to build Caliburn in release mode

I can't make nant do a release build of Caliburn using their build.cmd. Can anyone tell me how to? What command line parameters should I use? ...

Nant how do I list all the targets in the current project?

I'm constantly trying to remember some of the buried targets in my nant file. Is there a command that I can run before I run the target that lists the targets? ...

What is nAnt, and how it can be useful to me as a C# developer?

I'm always compile my project, and copy the dll's from the dependency projects to the UI bin folder. after a few days with 'copy & paste' operations each time that I recompile my project, I concluded that I need a tool that will do it to me automatically. after a few searches a founded that this tool is nAnt. I search for information ho...

cruisecontrol <buildargs> nant parameter not being passed

Hi, I've been trying to use the param in my cruisecontrol build config file to no avail. When checking the cruisecontrol log file, whatever buildargs I try to pass are NOT passed to the call to nAnt. Here's the nant task: <nant> <buildArgs>-D:CCFoo="Unknown" -D:foo="$(foo)"</buildArgs> <executable>C:\MCR\Trunk\BuildLibrary\NAnt...

SVN revert from within a NAnt script?

I thought this would be a simple task, but I'm currently unable to get it to work. There are built in functions such as <svn-update> etc. But not for revert it seems? I have tried using the following but get an error that I have no supplied enough parameters. <svn command="revert" destination="${root}" uri="${build.repos}" username="${...

Language (C# or VB.Net project) Impact on .Net Build Script

I am very new to writing Build Script. I am trying to understand the impact of the using Different languages (c#, vb.net c++) while creating a build script. Build script can written using either Nant or MSBuild. Is the only change in the build script is with regards to compiler switch or even the deployment structure also changes with...

nant vs. msbuild: stopping a service

I'm trying to decide which side I'm on in the MsBuild vs. Nant war. I'm starting with: stop a service, deploy some files, restart the service. Just from looking at these two links, that is much easier to do in Nant. MSBuild: http://stackoverflow.com/questions/173393/example-of-using-service-exists-msbuild-task-in-microsoft-sdc-tasks/17...

NANT Script does not always deploy dlls to GAC on dev machine

We have a NANT script that uses msbuild to compile our visual studio solutions and deploys the .dlls into the GAC. This works well on our integration/test servers as part of continuous integration, cruise control uses the NANT scripts and every time the dlls are put into the GAC without problem. On our local development machines, where...

NAnt - Including source files in a csc task outside of the base directory

I am just starting to pick up NAnt as a replacement for MSBuild in our CruiseControl project. One of the things we do inside a set of projects is link in a single AssemblyInfo.cs file from outside of the project tree to make versioning easier (it lives in a directory above the project folders). Is there an obvious way of achieving this...

nAnt script needs to get parent directory

I am writing a nAnt script and need to get the parent directory. I have used: <property name="perforceWS" value="${project::get-base-directory()}"/> this returns the current directory. How can I get the property to be the parent's directory? ...

How do I speed up Nant Builds?

Hello, We have a number of Nant scripts which compile .NET code. These builds are taking 5 - 10 minutes to run, and I would like to find a way to speed them up. Our Nant script looks something like <target name="compile.XYZ" description="Compiles the source code"> <msbuild project="${src.dir}\XYZ.sln" verbosity="${build.verbosi...

Using Linq to XML to write NAnt .build files

I'm trying to create an XML file using C# and Linq to XML, but am having problems with the nant namespace. var myXElement = new XElement("project", new XAttribute("name", "MySystemName"), new XAttribute("default", "myNAntTargetName"), new XAttribute("xmlns", "http://nant.sf.net/schemas/nant.xsd")); myXElement.Save("c:\foo.xml"); Beca...

Delete dir with nAnt and exclude sub folder?

I'm looking for my build to delete the contents of a directory without touching a certain folder. Below is what I'm trying, and it even looks wrong to me...aside from the fact that it bombs when I run it. Do I need to be deleting the contents of the dir explicitly and at the same time exclude my Reports folder? <delete includeemptydi...

deploy tools: get a list of actions the tool will execute without executing the deploy script

We're in the process of evaluating MSBuild and Nant for deploys. We may roll our own tool. One thing that a different business unit -- let's call it DeptA -- would really like to have (as in it better have it) is the ability for someone in DeptA to read the script and see what it will do. Currently we do this with .bat files. We hates t...

Saving a Linq to Xml file as ANSI instead of UTF-8 in C# (Ivy)

In C#, I need to create XML files for use with Ivy and NAnt, but am having difficulty in getting the right encoding in the output file. If I use XElement's .Save("C:\foo.xml"), I get the correct looking file, but Ivy and/or NAnt gets upset, as the file is actually saved using UTF-8 but I actually need to save it as ANSI in order to be a...

How do I pass 2 parameters to Nant script?

Hello.. I have to write an Nant script that will accept 2 parameters on the command line. The first is just an option and has the following format: -myOption. The second one needs to be wrapped in quotes: "some value with space". e.g. -myOption "this value" I am new to Nant so I have unsuccessful so far and don't know how to output t...

What's wrong with my Nant Record task?

Hey everyone... I have the following in a build script: <record action="Start" autoflush="true" name="${nant.log}"/> The name value is valid. I get the following error message: Invalid element <record>.Unknown task or datatype. After looking at the documentation I am not sure why this is causing an error. Any ideas? ...

How to build silverlight website & create XAP's using script ?

I am just getting started with Silverlight and have recently added a Silverlight project to an established solution. In this particular scenario my solution included an existing ASP.NET web site which Visual Studio kindly offered to integrated my Silverlight application into, which I accepted. So everything is fine and all, and the Silv...

In NAnt, using the CSC task, how do I suppress compiler warnings?

I see the CSC task in NAnt has a nowarn attribute, but apparently this is deprecated. How can I suppress warnings then? ...