Hi, on the "Restore Solution" step of my build azure build pipeline I am getting the following error:
##[error]The nuget command failed with exit code(1) and error(/home/vsts/work/1/s/Web/ElDorado.Web/ElDorado.Web.csproj : error : Version 8.0.407 of the .NET SDK requires at least version 17.8.3 of MSBuild. The current available version of MSBuild is 16.10.1.31701. Change the .NET SDK specified in global.json to an older version that requires the MSBuild version currently available.
This is running the "ubuntu-latest" vm-image, this doesn't occur with a windows build agent but it seems we must use an ubuntu build agent for the AzureStaticWebApp@0 task.
Here is out build pipeline:
name: Azure Static Web Apps CI/CD
pr:
branches:
include:
- 1855-PrototypeBlazor
trigger:
branches:
include:
- 1855-PrototypeBlazor
variables:
solution: '**/*.sln'
buildConfiguration: 'Release'
jobs:
- job: build_and_deploy_job
displayName: Build and Deploy Job
condition: or(eq(variables['Build.Reason'], 'Manual'),or(eq(variables['Build.Reason'], 'PullRequest'),eq(variables['Build.Reason'], 'IndividualCI')))
pool:
vmImage: ubuntu-22.04
variables:
- group: Azure-Static-Web-Apps-salmon-wave-05885360f-variable-group
steps:
- checkout: self
submodules: true
- task: NuGetToolInstaller@1
displayName: "Install Nuget"
- task: NuGetAuthenticate@1
displayName: 'Trackhouse Nuget Authenticate'
inputs:
forceReinstallCredentialProvider: true
- task: NuGetCommand@2
displayName: "Restore Solution"
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'select'
vstsFeed: '*GUID hidden*'
includeNuGetOrg: false
- task: DotNetCoreCLI@2
displayName: "Build Solution"
name: "build"
inputs:
command: 'build'
projects: '$(solution)'
arguments: '--configuration $(buildConfiguration)'
- task: AzureStaticWebApp@0
inputs:
azure_static_web_apps_api_token: $(*Token hidden but was auto-generated*)
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "/Web//ElDorado.Web" # App source code path
api_location: "Api" # Api source code path - optional
output_location: "wwwroot" # Built app content directory - optional
###### End of Repository/Build Configurations ######