So I updated all the projects of my solution to .net core 6, before every single one was .net core 3.1.
Then I started to get the following error in build step:
##[error]PjInspe.Tests\PjInspe.Tests.csproj(0,0): Error NU1201:
Project PjInspe.Aplicacao is not compatible with netcoreapp3.1
(.NETCoreApp,Version=v3.1). Project PjInspe.Aplicacao supports:
net6.0 (.NETCoreApp,Version=v6.0)
But all the projects has this in the .csproj
And its the only project that is failing
Any ideas how to solve this?
EDIT:
My pipeline YAML
Iam using the windows 2022 to run the CI and I've seen the sdk from the net6 on the build logs
pool:
name: Azure Pipelines
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*Project.csproj'
vstsFeed: '***************'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: '$(Parameters.TestProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: True
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

