How to enable ASP.Net MVC element templates for S # arp architecture project

I have been playing around with building an application using the S # arp architecture .

I'm a little worried that I don't have access to any ASP.Net MVC item template from the Add New Item ... dialog. In other words, I cannot, for example, create a new "MVC ViewPage" or "MVC Controller" directly from the "Add New Item ..." dialog.

As a result, I have to create standard ASP.Net elements and then manipulate the markup and code to set up the correct inheritance structure.

Is there a way to get the ASP.Net MVC item templates to work in the Add New Item ... dialog of a project based on the S # arp architecture project template?

0


source to share


1 answer


I found the answer thanks to a comment from Todd Smith in the original question.

ASP.Net MVC item templates should be available in the Add New Item ... dialog under Web → MVC.

What I forgot to mention in my original question (because I didn't think it was important) was that I converted the original S # arp Architecture project template to VB.Net (slightly more convenient when working in VB. Network these days). It turns out I lost the ability to access ASP.Net MVC templates during my conversion.



The fix was simple. My version of SharpArch.Web VB.Net project was not defined as MVC project. I just had to add the corresponding project type GUID to the * .vbproj file (i.e. {603c0e0b-db56-11dc-be95-000d561079b0} ):

<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>

      

Thanks Todd!

0


source







All Articles