Alex Rivera | Logout

upload file with FTP using nant

Asked 2010-05-07T20:52:15.983
10

I have an NAnt script that I use to build my .NET project, and I'm looking to see if there is a way to upload the resulted assemblies to some remote folder using an FTP task.

I couldn't find any good example online, and I'm wondering if anyone knows how to do it, if it's doable at all.

FYI: I'm running it on a windows machine, if it makes any difference.

Edit
Report

1 Answer

3

Having the same need myself, I developed a basic FTP upload NAnt task. You can find it here: https://sourceforge.net/projects/w3c-nant/

Example usage (copy pasted from the site's API docs):

<ftpUpload host="ftp.myserver.com" username="root" password="r00t" todir="/">
    <fileset basedir="dist">
        <include name="**/*" />
        <exclude name="**/*.config" />
    </fileset>
</ftpUpload>

I already use it in my local build scripts to upload my site to its live server.

answered 2012-03-04T12:17:38.497

Your Answer