NAnt exec relative path

Posted by stacker on Stack Overflow See other posts from Stack Overflow or by stacker
Published on 2010-05-06T23:12:51Z Indexed on 2010/05/06 23:18 UTC
Read the original article Hit count: 329

Filed under:
|

How can I assign to trunk.dir property a relative path to the trunk location?

This is my nant.build file:

<?xml version="1.0" encoding="utf-8"?>
<project name="ProjectName" default="build" xmlns="http://nant.sf.net/release/0.85/nant.xsd">

    <!-- Directories -->
    <property name="trunk.dir" value="C:\Projects\ProjectName" /><!-- I want relative path over here! -->
    <property name="source.dir" value="${trunk.dir}src\" />

    <!-- Working Files -->
    <property name="msbuild.exe" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" />
    <property name="solution.sln" value="${source.dir}ProjectName.sln" />

    <!-- Called Externally -->
    <target name="compile">
        <!-- Rebuild foces msbuild to clean and build -->
        <exec program="${msbuild.exe}" commandline="${solution.sln} /t:Rebuild /v:q" />
    </target>

</project>

© Stack Overflow or respective owner

Related posts about nant

Related posts about relative-path