1
I made all my ASPNET Core API 3.1 but when I went to configure the CICD, Nuget Restore accuses version error... Speaking I have to use a version 2.1 or lower. (error to follow)
'##[error]The nuget command failed with Exit code(1) and error(C: Program Files dotnet sdk 2.1.515 Sdks Microsoft.NET.Sdk targets Microsoft.NET.Targetframeworkinference.targets(137,5): error NETSDK1045: The Current . NET SDK does not support Targeting . NET Core 3.1. Either target . NET Core 2.1 or Lower, or use a version of the . NET SDK that Supports . NET Core 3.1.'
For what I searched, I need to go in the project -> properties and change the version:
But when I do this, my startup.Cs class accuses errors:
and
Does anyone know if this is really the right way or if I need to do something?
thanks in advance.
Thanks for the answer. The problem is not itself in my machine. It works perfectly. I have the SDK 3 in my machine... The problem is in the portal devops when the pipe will run for CI...
– Lucas Bersot
@Lucasbersot maybe this post will help you then: "Setting up Azure Devops CI/CD for a . NET Core 3.1 Web App Hosted in Azure App Service for Linux" - https://www.hanselman.com/blog/SettingUpAzureDevOpsCICDForANETCore31WebAppHostedInAzureAppServiceForLinux.aspx
– OnoSendai