Model view controller 类型或命名空间名称';ApplicationUserManager';找不到

Model view controller 类型或命名空间名称';ApplicationUserManager';找不到,model-view-controller,google-login,Model View Controller,Google Login,我已尽我所能阅读Rick Anderson的以下文章: 我正在尝试让谷歌认证测试,并在我的本地机器上工作 Startup.Auth.cs如下所示(与本文完全相同): //将数据库上下文和用户管理器配置为每个请求使用一个实例 app.CreatePerOwinContext(ApplicationDbContext.Create); app.CreatePerOwinContext 或者更好: 我们的经理在哪里?是否有一个应该创建它的nuget包 我在不同的地方读到ApplicationUser

我已尽我所能阅读Rick Anderson的以下文章:

我正在尝试让谷歌认证测试,并在我的本地机器上工作

Startup.Auth.cs如下所示(与本文完全相同):

//将数据库上下文和用户管理器配置为每个请求使用一个实例
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext

或者更好:

我们的经理在哪里?是否有一个应该创建它的nuget包


我在不同的地方读到ApplicationUserManager以前在IdentityConfig.cs中,但是如果您坚持使用当前的nuget软件包,IdentityConfig.cs就不再存在了

我也有同样的问题。我一直在遵循一个教程,但我从VS2012开始的MVC5项目是一个空项目。我认为教程的创建者使用了一个不同的模板,它已经包含了我在NuGet中找到的内容

具体如下:


问题太多,请提出更具体的问题。太棒了!我在拔头发想弄清楚发生了什么。它显然“卸载”了这些软件包。一旦我确定四个都安装好了,我的红色曲线就消失了,哈哈。
// Configure the db context and user manager to use a single instance per request
app.CreatePerOwinContext(ApplicationDbContext.Create);
app.CreatePerOwinContext<ApplicationUserManager>(ApplicationUserManager.Create);


// Enable the application to use a cookie to store information for the signed in user
// and to use a cookie to temporarily store information about a user logging in with a third party login provider
// Configure the sign in cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
    AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
    LoginPath = new PathString("/Account/Login"),
    Provider = new CookieAuthenticationProvider
    {
        OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
            validateInterval: TimeSpan.FromMinutes(30),
            regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
    }
});

app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);