.net core VSTS dotnet运行步骤找不到上一步骤中的生成

.net core VSTS dotnet运行步骤找不到上一步骤中的生成,.net-core,azure-devops,runtime-error,.net Core,Azure Devops,Runtime Error,我已配置以下成功的dotnet构建release pipeline步骤: Task version: 2.* Display name: dotnet build Command: build Path to project(s): **/AppConsole.csproj Arguments: 紧接着是一个失败的dotnet运行步骤: Task version: 2.* Display name: dotnet run Command: run Path to project(s): **

我已配置以下成功的
dotnet构建
release pipeline步骤:

Task version: 2.*
Display name: dotnet build
Command: build
Path to project(s): **/AppConsole.csproj
Arguments: 
紧接着是一个失败的
dotnet运行
步骤:

Task version: 2.*
Display name: dotnet run
Command: run
Path to project(s): **/AppConsole.csproj
Arguments: 
将随消息退出:

[command]C:\agent_dply\_work\_tool\dotnet\dotnet.exe run C:\agent_dply\_work\r40\a\Testing\Tester\AppConsole.csproj
Couldn't find a project to run. Ensure a project exists in  C:\agent_dply\_work\r40\a.
Or pass the path to the project using --project
##[error]Error: The process 'C:\agent_dply\_work\_tool\dotnet\dotnet.exe' failed with exit code 1
##[error]Dotnet command failed with non-zero exit code on the following projects : C:\agent_dply\_work\r40\a\Testing\Tester\AppConsole.csproj

在VSTS下运行时,如何告诉
dotnet
命令项目的位置?正如它所建议的那样,我尝试过使用
--project
标志,但它给出了类似的错误。

我很好奇为什么你还要在构建服务器上运行?我想运行一个控制台应用程序,它可以处理一些文件,为下一步做准备,这就是dotnet test。尝试设置“dotnet run”的工作目录到您的项目所在的目录
dotnet run
意味着生成,但您需要手动生成步骤吗?dotnet run通常不会像上面记录的任务中那样被调用。在这种情况下,尽量不要使用dotnet任务,只使用带有“dotnet run”的命令行任务,并将工作目录设置为项目所在的目录