Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top