msbuildtasks
msbuildtasks copied to clipboard
FTPUpload single files with options
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)"-->