【发布时间】:2019-08-21 14:58:03
【问题描述】:
如果需要在dotnet publish 中做一个测试项目.Net Core 2.1,你能否举例说明如何在build.yaml 中指定。转介this 想不通。
下面说,yaml方式应该是什么
要使此任务正常运行,您必须已使用 dotnet publish --output $(Build.ArtifactStagingDirectory) 命令将构建的输出发布到此目录。要在发布前将其他文件复制到此目录,
例如下面如何在build.yaml 中表示类应用程序(API 解决方案)
dotnet publish ~/projects/app1/app1.csproj
在下面尝试过
- task: DotNetCoreCLI@2
displayName: "Prepare Publish Files"
inputs:
command: publish
projects: ""
arguments: --output $(Build.ArtifactStagingDirectory)/src/xxx.EndToEnd.Integration.Tests/xxx.EndToEnd.Integration.Tests.csproj
但出现以下错误,实际上我的是 API 解决方案,我正在尝试发布端到端测试并在部署后运行它们。
##[error]No web project was found in the repository. Web projects are identified by presence of either a web.config file or wwwroot folder in the directory.
##[error]Project file(s) matching the specified pattern were not found.
【问题讨论】:
标签: yaml azure-pipelines asp.net-core-2.1