简体   繁体   中英

build.artifactstagingdirectory doesn't exist Azure Devops

图片

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: 图2

With the following error:

550 The system cannot find the file specified.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM