close
close

c# – How can I update a project based on .NET Core SDK 2.1 to SDK 6.0

c# – How can I update a project based on .NET Core SDK 2.1 to SDK 6.0

I have a project created with .NET Core SDK 2.1 which is currently not supported on Visual Studio and Azure Web Service. I compiled the project on my local server and it ran fine on the web. I then updated the SDK to .NET Core 6.0 on my local machine and debugged. I keep getting an error like this:

“resource”: “/usr/local/share/dotnet/sdk/7.0.317/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.DefaultItems.Shared.targets”, “owner”: “msCompile”, “code”: “NETSDK1080”, “severity”: 4, “message”: “A package reference to Microsoft.AspNetCore.App is not required when targeting .NET Core 3.0 or later. If Microsoft.NET.Sdk.Web is used, the shared framework will be referenced automatically. Otherwise, the package reference must be replaced with a framework reference. (/Users/admin/Desktop/Projects/onlineschool-main/bim-edu.csproj)”, “source”: “cpp”, “startLineNumber”: 111, “startColumn”: 5, “endLineNumber”: 111, “endColumn”: 5

This is line 111 below

<NETSdkWarning Condition="'$(_ShouldRemoveAspNetCoreApp)' == 'true'" 
ResourceName="AspNetCoreUsesFrameworkReference" />

What can I do to ensure that this same project runs on SDK 6.0 or higher, since I want to host it on my Azure server and Azure no longer supports SDK 2.1.