nant

Read the text file ,split the line in a text file and send the email for that line using nant scripting

Hi , I have a below requirement to be done using nant scripting 1) Read the text file line by line and split the line 2) Each line should be sent as an email to the concerned team ...

How do I evaluate a string as a property name in Nant?

I'm rejigging our deploy scripts, and have moved to external config files for each defined environment. I have the ${environment} and the ${system} component passed as variables on the command line. I load config.${environment}.xml, which contains a bunch of property definitions. <property name="server.component1" value="server01" /...

Nant builds with embedded resources fails

I'm trying to do an Nant build on my Visual Studio project. I have a few directories of 3rd party XSD files that I'm using as embedded resources. Some of the XSD files have the same name even though the files are in different directories. When I try to compile my project. I get this error: [csc] error CS1508: Resource identifier 'Cod...

What is the best NANT template for Continuous Integration (CI) that you've seen?

Hopefully it covers most common targets while factoring in MSBuild, web deployment, source control checkout, configuration management (config files for multiple env) and Hudson. ...

OutputPath is set to be bin\x86\release but shown as obj\x86\release when msbuilding?

in my csproj the OutputPath is set as the following: <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DefineTrace>true</DefineTrace> <OutputPath>bin\x86\Release\</OutputPath> .... </PropertyGroup> in my nant script, I have this: <msbuild project="${demo.solution}"> <property name="Configuration" value="...

How to identify where I am publishing to for use in the pre-build event

I would like to use Nant to create an environment-specific web.config during the build process when I'm publishing to a given location. For example, when I am publishing to my TEST server, I want the web.config's connection string to point to the TEST database. When in PROD, to the PROD database. I have Nant working in the pre-build, ...

NAnt, sqlcmd.exe and error codes

I can't seem to get NAnt to abort my build when it encounters an error. Here's one of many sqlcmd.exe executions: <property name="test" value=""/> <exec program="sqlcmd.exe" resultproperty="test" failonerror="true" basedir="${sqlcmd.dir}" commandline="${commandline.script}" verbose="true"> <arg value="${filename}" /> <arg v...

How can I call Nant scripts from Maven?

I'm working on a mainly Java based project, that also has a couple of components written in C++. The project is currently built using Ant scripts which invoke Nant to build the C++ components. We are in the process of moving to Maven and I was wondering if anyone could recommend the best way to build Nant scripts using Maven. I'm awar...

Nant Build script undifined Issue

Hi, I have the following code in a nant build script: <project name="fgs"> <property name="build.dir" value="build"/> <property name="build.bin.dir" value="${build.dir}/bin"/> <fileset id="provider.1.0-references" basedir="${build.bin.dir}"> <include name="thenameofadllfile.*"/> </fileset> <macrodef name="build-dist"> <at...

Does MSBuild have an equivalent to the NAnt filterchain functionality for replacing tokens in files?

The NAnt task for copying files allows you to specify a filterchain that modifies the files as they are copied, and this is usually used for replacing tokens in a template file with specific values (e.g. substituting in a build number). Does MSBuild have equivalent functionality in one of its built-in tasks, or one of the freely availab...

Play sound with automated build fails

Hi everyone We are using TeamCity v4 and Nant for continuous integration builds on a server in our work area. we would like to have the build server play a mp3 or wav file when the build fails...anyone has any ideas around this? Thanks ...

NUnit tests are executed slower by MSBuild than by NAnt

I am in the process of porting a NAnt build script to MSBuild 4.0 and I am seeing a rather interesting behaviour. MSBuild is slightly faster when executing filesystem and compilation tasks, but takes twice as long to run NUnit tests. Here's some background info: I am using nant-0.91-alpha2 and MSBuild 4.0 I am using NUnit v2.5.7 NAn...

Cruise Control .Net not showing Nant build errors

We are running Cruise Control 1.5.7256.1 and using it to do builds using Nant and Nantcontrib. The builds are failing and succeeding correctly, but when they fail the related error messages are being shown on the CCNet Build Report page. See image below The build errors can be seen on the View Build Log page, but they aren't making it...

MSBuild solution with two web projects

Hi, my solution has two web projects. What I want to do is to build the solution through team city but have each web project going to a different output directory? Does anyone know how to do this? I am using Nant but I believe I can push through any required parameters into MSBuild. Thanks. ...

Building Flex with Nant?

I'm wondering if I'm barking up the wrong tree here. Is it possible to replace an Ant build script used for building Flex projects with a Nant build script? Specifically, it doesn't seem like there are any replacements for the Ant <mxmlc>, <macrodef> and <taskdef> tasks provided with Nant or Nant-contrib. I'm not too experienced in ei...

Nant failing with bad permissions on build server

Total newbie question. I am trying to run a Nant script on a build server (very basic script, not doing anything), and it's failing with the error System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934...

problems with xmlpoke in nant script when reading a semicolon in a string

I have a nant script that is trying to change a URL value in my web.config but Nant keeps throwing this error: '=' is an unexpected token. The expected token is ';'. Line 1, position 80. I traced it down to the semicolon in the URL of the nant script. The reason I have a semicolon in the URL in the first place is because the web.conf...

Issue with OleDbConnection.Open when Running as a Service

We have an Nant build script that we are running through SSH (Cygwin & Open SSH) to remotely upgrade our databases. When the Nant script is launched through an SSH session, the following error is thrown when it attempts to make a database connection. However, if I log in to the server directly (using the same account as the service) an...

Is it possible to suppress NAnt's exec task's "[exec]" console output prefix

I'm trying to integrate Robot Framework (an acceptance testing framework) with TeamCity. In order to do this it needs to send messages to the console output which TeamCity will then read and return realtime test progress/results. I'm doing this by calling the command line to run the tests with a simple exec task. Everything seemed to be ...

In nant, how to delete contents of a directory, but not the directory itself?

Suppose I were scripting a deployment using nant on a Windows server to a file share: \\server\share. I want a nant script to delete all files from the share then copy in new files. I have this code to delete the files, but I'm getting an error that it can't delete "\server\share". But I didn't want to delete the share, just the conte...