C# ManageUserViewModel类在哪里?

C# ManageUserViewModel类在哪里?,c#,asp.net-mvc,asp.net-mvc-5,C#,Asp.net Mvc,Asp.net Mvc 5,我使用ASP.NETMVC5、EF6和.NET4.5.1创建了一个项目 在某个时候,我需要将项目所在的名称空间从“MyTestProject”更改为“MyRealProject” 在整个网站进行了这些更改之后,我现在在几个视图中发现了几个错误。 _ChangePasswordPartial.cshtml再也找不到“@model Microsoft.AspNet.Identity.ManageUserViewModel”,而_SetPasswordPartial.cshtml也找不到“MyReal

我使用ASP.NETMVC5、EF6和.NET4.5.1创建了一个项目 在某个时候,我需要将项目所在的名称空间从“MyTestProject”更改为“MyRealProject”

在整个网站进行了这些更改之后,我现在在几个视图中发现了几个错误。 _ChangePasswordPartial.cshtml再也找不到“@model Microsoft.AspNet.Identity.ManageUserViewModel”,而_SetPasswordPartial.cshtml也找不到“MyRealProject.ManageUserViewModel”


在项目中的任何位置都找不到包含ManageUserViewModel类的文件。在我更改名称空间之前,已经找到了它,但现在没有。为什么?它到哪里去了?如何修复它?

\u ChangePasswordPartial.cshtml应该使用

@model MyRealProject.Models.SetPasswordViewModel
然后确保在模型文件夹AccountViewModels.cs中

名称空间更新为
MyRealProject


希望有帮助。

CRTL+SHIFT+F,然后键入“class-ManageUserViewModel”,就这么简单


确保将其设置为搜索整个解决方案,它将找到您要查找的类

发现这是一个已知问题:

  • 从MVC、WebAPI或SPA模板创建带有单独身份验证的默认C#ASP.NET Web应用程序时,生成的视图\Account\\u SetPasswordPartial.cshtml和_ChangePasswordPartial.cshtml文件包含无效模型
  • 在文件_SetPasswordPartial.cshtml中

    @model.Models.ManageUserViewModel 应改为: @model.Models.SetPasswordViewModel

    在文件_ChangePasswordPartial.cshtml中

    @模型Microsoft.AspNet.Identity.ManageUserViewModel 应改为: @model.Models.ChangePasswordViewModel

    生成的VB项目也存在类似的问题

    在文件_SetPasswordPartial.vbhtml中

    @模型类型ManageUserViewModel 应改为: @ModelType SetPasswordViewModel

    在文件_ChangePasswordPartial.vbhtml中

    @模型类型ManageUserViewModel 应改为: @ModelType ChangePasswordViewModel


    也张贴在这里:。我不知道有重复问题和答案的规则是什么,请根据需要编辑。

    我已经搜索了完整的解决方案。它不存在于解决方案中。