[英]build.artifactstagingdirectory doesn't exist Azure Devops
I'm trying to publish a ClickOnce application.我正在尝试发布 ClickOnce 应用程序。 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.为此,我使用 msbuild
publish
目标参数构建项目,将文件复制到工件暂存目录,然后尝试通过 FTP 上传该目录。
However, the ftpupload task is failing:但是,ftpupload 任务失败:
With the following error:出现以下错误:
550 The system cannot find the file specified.
550 系统找不到指定的文件。
550 The system cannot find the file specified.
550 系统找不到指定的文件。
This error doesn't indicate that the specified files are missing in build.artifactstagingdirectory
folder.此错误并不表示
build.artifactstagingdirectory
文件夹中缺少指定的文件。
Actually the task would always succeed with the warning Could not find any files to upload
even when the build.artifactstagingdirectory
folder is empty:实际上,即使
build.artifactstagingdirectory
文件夹为空,该任务也会始终成功并显示警告Could not find any files to upload
:
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.要使 FTP 上传任务成功运行,您可能需要检查该任务的
Remote directory
输入,并确保您的 FTP 远程服务器配置正确。
1.Assuming your remote home directory is C:\FTPfolder
. 1.假设您的远程主目录是
C:\FTPfolder
。 You should use /TestFolder/
as input if you want to upload the files to C:\FTPfolder\TestFolder
.如果要将文件上传到
C:\FTPfolder\TestFolder
,则应使用/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... 2.如果您的上传任务在此过程中会在远程目录中创建一个新文件夹,则应确保用户帐户具有相关目录访问权限,例如创建子文件夹...
PS: I run this pipeline in my self-hosted agent to upload files to remote directory in remote machine with Serv-U ftp server. PS:我在我的自托管代理中运行此管道,以使用 Serv-U ftp 服务器将文件上传到远程机器的远程目录。 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.它可能因一台 FTP 服务器而异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.