dotnet-presentations / blazor-workshop

Blazor workshop
https://aka.ms/blazorworkshop
MIT License
3.5k stars 1.55k forks source link

GetSpecials endpoint throwing exception after upgrading to .NET 6 #331

Closed dotnetspark closed 2 years ago

dotnetspark commented 2 years ago

When opening the solution at 00-getting-started and upgrading target framework to .NET 6. I started to get an exception in the Dev Console related to SpecialsController. I added a try/catch to the line failing and see the exception details below. Btw, the database has not being modified, hence it's using the existing data as is.

image

See below the data stored in the Specials table

image
dotnetspark commented 2 years ago

I figured it out. It’s the build.props. It was set to .NET 5 and my projects upgraded to 6