I have tried in my azure build pipeline to set a DotNetCoreCLI build task to build a solution but I just get an error:
MSBUILD : error MSB1011: Specify which project or solution file to use because this folder contains more than one project or solution file. ##[error]Error: The process 'D:\WorkLib\DkDep372\Default_Win2019\1_tool\dotnet\dotnet.exe' failed with exit code 1
even though I specify solution like this:
variables:
solution: '**/MyWebApp.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
solution: '$(solution)'
configuration: $(buildConfiguration)
So my question is if DotNetCoreCLI
can build a solution of it just can build projects?
This page indicates that it can. This page says something about projects but not about solutions. I havn't been able to find a single example with a build with a specified solution.