简体   繁体   English

build.artifactstaging 目录不存在 Azure Devops

[英]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 任务失败: 图2

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.

相关问题 Azure 为 Windows 服务构建任务:- $(build.artifactstagingdirectory) 下没有 zip - Azure Build task for Windows Service :- no zip under $(build.artifactstagingdirectory) 在 Azure Dev Ops 上:如何查看 package 位置目录 $(Build.ArtifactStagingDirectory) 的内容 - On Azure Dev Ops: How do I view the content of the package location directory $(Build.ArtifactStagingDirectory) 我可以直接将文件保存到 $(Build.ArtifactStagingDirectory) 并发布它们吗? - Can I save files directly to $(Build.ArtifactStagingDirectory) and publish them? msbuild 参数 /p:OutDir="$(build.artifactstagingdirectory)" 导致某些项目错过“bin/release”文件夹 - msbuild argument /p:OutDir="$(build.artifactstagingdirectory)" causing some projects to miss "bin/release" folder 复制 msbuild 之后的文件复制到根文件夹 $(build.ArtifactStagingDirectory) - Copying files after the msbuild do copy to the root folder $(build.ArtifactStagingDirectory) 在 Azure Devops 的项目中触发另一个构建 - Trigger another build exist in project in Azure Devops Azure DevOps .NET Core 构建和发布不会保留给定的应用程序版本 - Azure DevOps .NET Core build and publish doesn't keep given application version “RequestsDependencyWarning:urllib3 (1.26.12) 或 chardet (3.0.4) 与支持的版本不匹配!” 在 Azure DevOps - Azure 物联网边缘任务 - 构建 - "RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!" in Azure DevOps - Azure IoT Edge Task - build Redis Cloud在Azure市场中不存在 - Redis Cloud doesn't exist in Azure Marketplace Azure CLI 2.0.79 中不存在 webapp - webapp doesn't exist with Azure CLI 2.0.79
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM