I have to upgrade WebAPI .Net core application from 6.0 to 8.0. From Visual Studio installed, I installed .Net SDK 8.0.0 (X64) on my local. I installed upgrade assistant and upgraded to .NET 8.0.
My .csproj file show TargetFramework 8.0 now.
In Program.cs at CreateHostBuilder(args) I get InvalidOperation Exception for Multiple constructors.
I do have Startup.cs file too. I also upgraded the Nuget Packages. No compile time error but I am getting this error in Program.cs file at run time.
Aarti Karnik – OIT is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1