【发布时间】:2020-06-28 14:56:41
【问题描述】:
我有 AzureDevops 管道来构建和测试我的 .net 核心 Azure Functions 解决方案。本地测试运行良好,但在构建代理时确实失败(我尝试了不同的代理)
这是错误日志:
##[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
##[error]Dotnet command failed with non-zero exit code on the following projects : C:\BuildAgent\_work\20\s\UnitTestProject\UnitTestProject.csproj
##[section]Finishing: Test
这是我的 yaml 文件:
trigger:
- dev
pool: 'SelfHosted'
variables:
workingDirectory: '$(System.DefaultWorkingDirectory)/'
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: 'restore'
projects: '**/*.csproj'
feedsToUse: 'select'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: 'build'
projects: '**/*.csproj'
arguments: '--output $(System.DefaultWorkingDirectory)/publish_output --configuration Release'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: 'test'
projects: '**/*.csproj'
publishTestResults: false
请建议,提前谢谢!
【问题讨论】:
-
发布包含特定编译错误的其余错误日志。
-
AssemblyInfo 源代码是项目的一部分吗?
-
您是否尝试过阅读输出中的错误消息?确切地告诉你问题是什么?
-
嗨,您尝试过以下解决方案吗,效果如何?
标签: .net-core azure-devops azure-functions