Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add-migration in ASP.NET Core MVC - Up and Running Part 2 (.NET Core 5) #3

Open
ostwolf opened this issue Feb 14, 2021 · 2 comments
Open

Comments

@ostwolf
Copy link

ostwolf commented Feb 14, 2021

Hi
I'm getting this error when trying to add migration after upgrading the project in Package Manager Console...

'Microsoft.AspNetCore.Authentication.AuthenticationBuilder Microsoft.Extensions.DependencyInjection.OAuthExtensions.AddOAuth(Microsoft.AspNetCore.Authentication.AuthenticationBuilder, System.String, System.String, System.Action`2<System.__Canon,!!2>)'.
Unable to create an object of type 'ApplicationDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

@bhrugen
Copy link
Contributor

bhrugen commented Feb 15, 2021

can you make sure all projects are in .NET 5?

@ostwolf
Copy link
Author

ostwolf commented Feb 15, 2021

Hi!
Yes, all seems is the correct version.
I had to put comment on this fragment in Startup.cs. After I commented it everything works fine. Can you explain why please? :
services.AddAuthentication().AddFacebook(Options =>
{
Options.AppId = "979166549209276";
Options.AppSecret = "0136648c5c6de648ac4d61b2d6534281";
});

Regards
Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants