No UseDatabaseErrorPage() extension method in Net Core 3.0
Solution 1
Add a reference to 'Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore', it appears that function is in that package now.
Solution 2
use
Install-Package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore -Version 3.1.5
Solution 3
[CLI]
dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore --version 3.1.2
[StartUp.cs]
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore;
Levvy
Mostly self-learning student. Expert in Java and some JavaEE. Already developing C# as advanced developer. Getting used to Ruby. Trying own strength in webdev. Working on demand/orders. Feel free to ask about project or anything else. ;)
Updated on June 07, 2022Comments
-
Levvy almost 2 years
I have created Net Core 3.0 app and following code that worked in 2.2 now is not.
app.UseDatabaseErrorPage();
Looks like in 3.0 class
DatabaseErrorPageExtensions
does not exist withinMicrosoft.AspNetCore.Builder
namespace. Am I missing some dependency? I have EntityFrameworkCore NuGet with Tools and Design added.Adding
using Microsoft.AspNetCore.Builder;
not helped.