views:

208

answers:

2

I followed the guidance in the Professional Asp.net 1.0 Wrox book for adding the MVC references to an exisiting web application and it works well except for the scaffolding options. When i right click a controller i do not get the scaffold view options that you get in a new asp.net mvc app. I am sure there is a .csproj hack that is needed to get the scaffold options but i can't find any references anywhere. Has anyone else run into this and found a solution?

A: 

Have you looked at how you register the data context in you Global.asax file?

This link may have more details that can help: http://msdn.microsoft.com/en-us/library/system.web.dynamicdata.metamodel.registercontext.aspx and this: http://msdn.microsoft.com/en-us/library/system.web.dynamicdata.metamodel.aspx

Irwin
+3  A: 

Well google to the rescue. I found an answer at the following blog: http://wildermuth.com/Tag/ASP.NET+MVC

You need to edit the .csproj file and add to ProjectTypeGuids {603c0e0b-db56-11dc-be95-000d561079b0}. Order seems to matter. Originally i added to the end of the guid list and the project would not load and threw an unsupported error. I created an empty mvc site and looked at the guids and the guid above was listed 1st. So i added it to the beginning and everything worked fine.

coolness. good stuff.
Irwin
I added it at the end, no luck, added it at the front like you said, it worked. Thanks!
MrBoJangles