Took too long to realize but turns out we should be using a DotnetCoreCLI@2 task NOT a Nuget Command which in hindsight is super obvious. instead of the vsts feed input we are using a nuget.config file in our solution which is accomplishing the same thing. So our pipeline ended up at this, also of major note is that we are seperately building restoring, publishing, and then running the AzureStaticWebApp task without building as it was unable to find out private feed based on this post
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-latest
variables:
- group: [Resource Group]
steps:
- checkout: self
submodules: true
- task: NuGetToolInstaller@1
displayName: "Install Nuget"
- task: NuGetAuthenticate@1
displayName: 'Nuget Authenticate'
inputs:
forceReinstallCredentialProvider: true
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '$(solution)'
feedsToUse: 'config'
nugetConfigPath: './nuget.config'
- task: DotNetCoreCLI@2
displayName: "Build Solution"
name: "build"
inputs:
command: 'build'
projects: '$(solution)'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Publish'
inputs:
command: 'publish'
publishWebProjects: true
arguments: '--configuration $(buildConfiguration)'
zipAfterPublish: false
- task: AzureStaticWebApp@0
inputs:
skip_app_build: true
azure_static_web_apps_api_token: $(AZURE_STATIC_WEB_APPS_API_TOKEN_*)
app_location: "/Web/ElDorado.Web/bin/Release/net9.0/publish/wwwroot" # App source code path
output_location: '' # Built app content directory - optional