Reputation: 4375
I'm trying to publish a ClickOnce application. To do so, I'm building the project with the msbuild publish
target argument, copying the files to the artifact staging directory, then attempting to upload that directory via FTP.
However, the ftpupload task is failing:
With the following error:
550 The system cannot find the file specified.
Upvotes: 2
Views: 1895
Reputation: 28196
550 The system cannot find the file specified.
This error doesn't indicate that the specified files are missing in build.artifactstagingdirectory
folder.
Actually the task would always succeed with the warning Could not find any files to upload
even when the build.artifactstagingdirectory
folder is empty:
To make the FTP upload task work successfully, you may need to check your Remote directory
input of that task and make sure your FTP remote Server is configured well.
1.Assuming your remote home directory is C:\FTPfolder
. You should use /TestFolder/
as input if you want to upload the files to C:\FTPfolder\TestFolder
. (Be careful about the slash)
2.If your upload task would create a new folder in remote directory during this process, you should make sure the user account has the related directory access like creating sub-folders...
PS: I run this pipeline in my self-hosted agent to upload files to remote directory in remote machine with Serv-U ftp server. The task works well in my side.
Upvotes: 2
Reputation: 4375
For whatever reason, removing the /
at the begging of the Remote Directory field fixed it. Most say the /
at the beginning is needed, however. It might vary from one FTP server to another.
Upvotes: 2