Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTPUpload single files with options #296

Open
KKacer opened this issue Jun 10, 2020 · 0 comments
Open

FTPUpload single files with options #296

KKacer opened this issue Jun 10, 2020 · 0 comments

Comments

@KKacer
Copy link

KKacer commented Jun 10, 2020

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)"-->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant