添加控制器模型类未显示 [英] Add Controller Model Classes not shown

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

问题描述

我设法创建一个型号第一的DbContext模型(这是一个正常的ObjectContext派生模型之前)。

I managed to create a Model First DBContext model (before it was a normal ObjectContext derived model).

Strangly现在我的VS未显示在添加控制器任我在型号选择列表的类。或多或少的一切外部显示在这里 - 除了我自己塞入。是的 - 我编译code时,code无错编译和重新启动VS多次。不知道究竟发生了什么事情。

Strangly now my VS is not showing ANY of my classes in the Model selectlist in "Add Controller". More or less everything external is shown here - except my own stuf. Yes - i compiled the code, the code is compiling without errors and restarted VS multiple times. No clue what the heck is going on.

在数据上下文类选择一样的。

Same in the Data Context Class selector.

Manuelly设置类是行不通的。添加将总是抱怨我从列表中选择。

Manuelly setting the class is not working. Add will always complain I have to choose from the list.

在哪里VS获取数据填充列表?

Where is VS getting the data for filling the list?

框架:MVC4,VS2010,EF4.3.1

Framework: MVC4, VS2010, EF4.3.1

推荐答案

有同样的问题。研究发现,仅仅构建项目剪掉解决丢失的模型类的问题。然而,重建项目,解决它的时候了。

Had the same problem. Found that just Building the project didnt solve the problem of the missing Model classes. Rebuilding the project however, solved it right away.

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

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