简体   繁体   English

脚手架在 Visual Studio 2022 .NET 6 核中不起作用

[英]Scaffolding not working in Visual Studio 2022 .NET 6 Core

I could not get the reflection type for this LoginViewModel:我无法获得此 LoginViewModel 的反射类型:

 public class LoginViewModel
    {
        public string Email { get; set; }
        public string Password { get; set; }
    }

Scaffolding forced me to choose the context, but "LoginViewModel" is not listed in contexts:脚手架迫使我选择上下文,但上下文中没有列出“LoginViewModel”:

This is the error I get:这是我得到的错误:

How do I solve this?我该如何解决这个问题?

This is often caused by a mismatch of versions.这通常是由版本不匹配引起的。 Check your Nuget packages.检查您的 Nuget 包。 Refer to this question: asp.net mvc core The call is ambiguous between the following methods or properties:参考这个问题: asp.net mvc core 调用在以下方法或属性之间有歧义:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ASP.NET Core 自定义脚手架 - Visual Studio 2019 - ASP.NET Core Custom Scaffolding - Visual Studio 2019 Visual Studio 2022 ASP.NET Core 6 Default application 和 Add folder to workspace in Chrome DevTools 不再工作 - Visual Studio 2022 ASP.NET Core 6 Default application and Add folder to workspace in Chrome DevTools is not working anymore 如何在Visual Studio 2022中打开.net核心实现方法 - How to open .net core implemented method in Visual Studio 2022 在 Visual Studio 2022 ASP.NET Core 6 上启用 JQuery Intellisense - Enable JQuery Intellisense on Visual Studio 2022 ASP.NET Core 6 热重载在 Visual Studio 2022.Net 6 Razor 项目中不起作用 - Hot Reload not working in Visual Studio 2022 .Net 6 Razor projects 为什么 Visual Studio 2019 16.9.5 中 .NET Core 3.1 和 .NET 5 的脚手架标识失败? - Why does Scaffolding Identity for .NET Core 3.1 and .NET 5 in Visual Studio 2019 16.9.5 fail? 如何在 ASP .NET Core 中搭建脚手架时阻止 Visual Studio 自动更新依赖项 - How to Stop Visual Studio from Automatically Updating Dependencies while scaffolding Identity in ASP .NET Core Visual Studio .net 核心标签助手不工作 - Visual Studio .net core tag helpers not working 在 Visual Studio 2022 中使用 ASP.NET Core 和 React (TypeScript) 创建一个(基于 .NET 6 的)网站项目? - Creating a (.NET 6 based) website project with ASP.NET Core and React (TypeScript) in Visual Studio 2022? ASP.NET 核心 - 在 Visual Studio 2022 中授权重定向到相同的 url 而不是身份服务器的 url - ASP.NET Core - In Visual Studio 2022 for authorize redirects to same url instead of url of Identity Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM