MVC View Template missing?

8 views
Skip to first unread message

joedirt

unread,
Jun 5, 2009, 3:22:25 PM6/5/09
to S#arp Architecture
Does the S#arp Architecture have the MVC 1.0 view templates
implemented? Two things bring this to mind. First looking at the
Northwind example, I see the views have codebehind pages. Second,
when I right click on the Web project to add a new view, the context
menu doesn't have "View...". Also, the template list is missing the
MVC View Content Page, MVC View Page, etc.

Any ideas on how I should get those things to show up?

JB

unread,
Jun 5, 2009, 3:27:37 PM6/5/09
to S#arp Architecture
From the docs:

7. The generated project does not depend on ASP.NET MVC being
installed on the development machine. While this is good for
compatibility with multiple versions of MVC, the drawback is that
ASP.NET MVC item templates are not available within Visual Studio by
default. If you have ASP.NET MVC installed and you’d like to have the
item templates available, do the following:

a. Using Windows Explorer, browse to the generated project and
open <YOUR PROJECT>.Web.csproj with Notepad.
b. Insert the following immediately after the opening
<ProjectTypeGuids> tag, and before the other GUIDs: “{603c0e0b-
db56-11dc-be95-000d561079b0};”
c. Save and close the csproj file; you’ll be prompted to reload it
in VS.

Jamir Shaikh

unread,
Jun 7, 2009, 2:14:49 AM6/7/09
to sharp-arc...@googlegroups.com


On Fri, Jun 5, 2009 at 12:27 PM, JB <jeff.ba...@gmail.com> wrote:

From the docs:


   b. Insert the following immediately after the opening
<ProjectTypeGuids> tag, and before the other GUIDs:  “{603c0e0b-
db56-11dc-be95-000d561079b0};”
   c. Save and close the csproj file; you’ll be prompted to reload it
in VS.

This lets you add View to Web Project and it does not let you add MVC Controller class to the Controller

--
Thanks,
Jamir

joedirt

unread,
Jun 10, 2009, 8:43:02 AM6/10/09
to S#arp Architecture
I think this is appropriate, since the Controllers are in their own
project according to the architecture. It would almost need to be its
own custom template in order to get the context menu option for adding
a controller, don't you think?

In any case, the suggestion above worked. Thanks folks!

On Jun 7, 1:14 am, Jamir Shaikh <jamir.sha...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages