views:

290

answers:

2

I have a problem with a custom built ASP.NET MVC2. The strongly-typed views break as the viewdata is treated as 'Object' instead of the corresponding type. The same views work perfectly with the default MVC2 from Microsoft.

A: 

Currently I'm also looking for a solution. In my project all strongly-typed Views have a Model-reference to an Object instead of the defined class.

Even when I create a totally new View there won't be anything than an Object as Model-type.

Maybe these solutions will help you - unfortunately they don't fit my problem.

http://stackoverflow.com/questions/1532838/object-model-types-in-mvc2-using-strongly-typed-view-pages-problem

h__p://stackoverflow.com/questions/2531729/intellisense-not-working-for-viewmodel-for-mvc2-project-in-asp-net-mvc2-rtw (as a new user I'm only allowed to post one link... )

Olaf Watteroth
+1  A: 

Finally I found my solution: The whole projects in my VisualStudio-solution were targeted for .NET 3.5 and not 4.0

By simply changing the targeted framework the whole solution compiled and run smooth on the webdev. But the changes had to be made to every single referenced project of the solution - otherwise Visual Studio won't debug into them.

Hope I could help someone with this information.

Olaf Watteroth