Azure Devops ci 管道无法构建 asp.net 核心项目,因为它位于 github 存储库的子文件夹中

Fah*_*rar 2 continuous-integration github azure-devops

我必须构建一个带有角度前端的 asp.net 核心 spa 项目。所以我创建了两个文件夹,一个用于 asp.net 核心 API,另一个用于 angular 项目,并将其推送到 GitHub 上。我正在将项目与Azure Pipe Lines集成!GitHub 中的应用程序,以便我可以轻松地使用 Azure devops 执行 ci/cd。请注意,我只想在子文件夹中构建 API 项目。项目的 github 链接:https : //github.com/lazyfahim/tritronv2 和 azure yml 管道代码:https : //github.com/lazyfahim/tritronv2/blob/master/azure-pipelines.yml

构建终端中显示的错误消息是

    MSBUILD : error MSB1003: Specify a project or solution file. The 
    current working directory does not contain a project or solution file.
    ##[error]Bash exited with code '1'.
    ##[section]Finishing: dotnet build Release
Run Code Online (Sandbox Code Playgroud)

Mat*_*att 5

您可以在您的特定项目文件中编辑 yaml 并指向 dotnet 构建,例如:

steps:
- script: dotnet build SomeFolder\SomeProject.csproj --configuration $(buildConfiguration)
  displayName: 'dotnet build $(buildConfiguration)'
Run Code Online (Sandbox Code Playgroud)