views:

40

answers:

1

I have a very odd problem. Whenever I try to use the "Add View" dialog in ASP.NET MVC2 and then try to "Create a strongly-typed view" by selecting a "View data class" from the drop down of available classes none of the classes ("models") in my MVC project are showing up.

The very odd part is all of the assemblies that my MVC project is referencing, even other projects in the solution, their classes are showing up. I have tried cleaning, rebuilding, cleaning the obj folder but every single time for some reason none of the classes in my actual MVC assembly are showing up. It was working fine before but now it doesn't anymore and I can't really think of anything that has changed.

Anyone experienced this issue before? Thanks for the help!

Image of example: http://imgur.com/47itE.png

John Culviner

A: 

Some types from your project are filtered out by that dialog (for example all types ending in 'Controller', or all types in the System or Microsoft namespace). It's possible that your project does not have any types that would pass through the dialog's filters.

marcind
Thanks for the response! This isn't the problem. I have say "Person.cs" in the models folder of my MVC project. For some reason Person.cs isn't showing up at all in the drop down even though it did before (or classes of a similar nature)! Quite odd I know. It wouldn't be a big deal, but my company will soon be using the T4 capabilities of this tool to create our own templates so I have to figure out whats going on in order for us to be efficient.
John Culviner