Skip to content
This repository was archived by the owner on Oct 20, 2025. It is now read-only.
This repository was archived by the owner on Oct 20, 2025. It is now read-only.

FTPUpload single files with options #296

@KKacer

Description

@KKacer

Your FTP upload examples shows 2 scenarios:
Upload a file.

Your Example 1:

  <FtpUpload 
            LocalFile="MSBuild.Community.Tasks.zip" 
            RemoteUri="ftp://localhost/" />

Your Example 2:
Upload all the files in an ItemGroup:

  <FtpUpload
            Username="username"
            Password="password"
            UsePassive="true"
            RemoteUri="ftp://webserver.com/httpdocs/"
            LocalFiles="@(FilesToUpload)"
            RemoteFiles="@(FilesToUpload->'%(RecursiveDir)%(Filename)%(Extension)')" />

(I am using your setup.msi (v1.5))
Can't understand your example 1,
In your example you didn't provide u/p, and use passive, so I added them in my below example
I tried the below scenario:

  <Target Name="FTPOneFile" AfterTargets="ZipMaker">
    <FtpUpload
        Username="xxx"
        Password="xxxx"
        UsePassive="true"
        RemoteUri="ftp://xxxxx"
        LocalFile="$(ZipFile)"
    />
  </Target>

When running, it says RemoteFiles property is necessary and is missed here.
But I don't have multiple files, I want to upload only a single file, but with full set of properties.
Adding below line also will not solve the issue will give other issues about RecursiveDir

<!--RemoteFiles="$(ZipFile)"-->

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions