【发布时间】:2017-10-23 13:29:19
【问题描述】:
这是我的构建步骤
这是生成的日志
2017-10-23T12:46:42.8958745Z ##[section]Starting: dotnet run Tools
2017-10-23T12:46:42.8958745Z ==============================================================================
2017-10-23T12:46:42.8958745Z Task : .NET Core
2017-10-23T12:46:42.8958745Z Description : Build, test and publish using dotnet core command-line.
2017-10-23T12:46:42.8958745Z Version : 1.0.2
2017-10-23T12:46:42.8958745Z Author : Microsoft Corporation
2017-10-23T12:46:42.8958745Z Help : [More Information](https://go.microsoft.com/fwlink/?linkid=832194)
2017-10-23T12:46:42.8958745Z ==============================================================================
2017-10-23T12:46:43.3968589Z [command]"C:\Program Files\dotnet\dotnet.exe" run d:\a\1\s\Tools\Tools.csproj --configuration test
2017-10-23T12:46:43.5008554Z Couldn't find a project to run. Ensure a project exists in d:\a\1\s, or pass the path to the project using --project.
2017-10-23T12:46:43.5138548Z ##[error]Error: C:\Program Files\dotnet\dotnet.exe failed with return code: 1
2017-10-23T12:46:43.5138548Z ##[error]Dotnet command failed with non-zero exit code on the following projects : d:\a\1\s\Tools\Tools.csproj
2017-10-23T12:46:43.5168542Z ##[section]Finishing: dotnet run Tools
问题是,任务应该运行的项目不是通过--project 参数传递的。但是如何使用构建步骤提供的选项来做到这一点?
【问题讨论】:
-
工作区映射(获取源)的设置是什么?你的项目的结构是什么? (例如 Tools 文件夹中的 Tools.csproj)提供屏幕截图。