Visual Studio“添加控制器”模型类列表 [英] Visual Studio "Add Controller" list of model classes

查看:367
本文介绍了Visual Studio“添加控制器”模型类列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MVC项目中的添加控制器对话框提供了可供选择的模型类的下拉列表。这些通常是项目中的模型类,这就是我以前看到的。但现在我得到这个:

The "Add Controller" dialog on an MVC project provides a dropdown list of model classes to choose from. These are usually the model classes in the project, and that's what I used to see. But now I'm getting this:

任何想法出了什么问题,如何改回回到我相信是正常的方式?

Any idea what's wrong and how to change it back to what I believe is the normal way?

推荐答案

似乎没有解决这个问题的办法。该对话框显示解决方案中所有类的类,并包括任何导入的第三方类(使用类似NuGet的类)。哪种有意义。因此这是一个功能,而不是错误。

It seems there's no solution to this problem. That dialog shows the classes from all the classes in the solution, and that includes any 3rd party classes that were imported (using something like NuGet). Which kind of makes sense. So it's a feature, not a bug.

筛选整个列表的解决方法是利用对话框中内置的自动完成功能,这使得它很容易找到所需的完整类名。

The workaround to sifting through that whole list is to take advantage of the autocomplete functionality built into that dialog, which makes it quite easy to find the required full class name.

这篇关于Visual Studio“添加控制器”模型类列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆