Visual Studio的"新增控制器"模型类的列表 [英] Visual Studio "Add Controller" list of model classes

查看:144
本文介绍了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天全站免登陆