c# - Visual Studio Team Services - 如何将构建的 Windows 服务文件复制到 Azure VM

标签 c# visual-studio azure continuous-integration azure-devops

我正在尝试运行 Visual Studio Team Services 自动构建和部署,但在将构建的 Windows 服务复制到 Azure VM 时遇到问题。

这些是我的步骤:

构建 enter image description here

尝试使用 Windows 文件复制 enter image description here

尝试使用 Azure 文件复制 enter image description here

当我使用 Azure 文件复制从 Web 项目 (ASP.NET MVC 5) 复制文件时,一切正常并且文件已传输。当我尝试复制 Windows 服务构建的文件时,它会默默地失败。任务成功通过,但当我通过远程桌面打开虚拟机时,该文件夹为空。有什么想法吗?

最佳答案

Windows Service 项目与 Asp.Net MVC 项目不同。使用您在“Visual Studio Build”步骤的“MSBuild Arguments”中指定的参数,“$(build.stagingdirectory)”文件夹中不会生成文件。因此“Azure 文件复制”任务刚刚通过并且没有复制任何内容。

要解决此问题,请将参数更改为以下内容,然后再次尝试构建:

/p:outputpath="$(build.stagingdirectory)"

关于c# - Visual Studio Team Services - 如何将构建的 Windows 服务文件复制到 Azure VM,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36891848/

相关文章:

visual-studio - 如何在 Visual Studio for Mac 中显示隐藏文件?

c# - 单元测试看不到我的方法

azure - 微软图谱;电源外壳;如何使用 invoke-restmethod 和 : TenantID, ClientID 和 *certificate* 获取访问 token

c# - 如何使用 C# 获取 Active Directory 中所有域的列表

c# - 如何处理 System.Windows.Media.MediaPlayer

c# - 对于在 ASP.Net WebAPI 应用程序中存储枚举的位置是否有任何约定?

c# - 水平显示数据库列数据

linux - Visual Studio Code 1.0 x11 转发?

windows - Windows Azure 云项目中的性能分析在哪里配置?

node.js - Azure Pipeline - 使用 Azure Feed 进行 npm 安装错误 403