0

I've been playing around with creating an application using the S#arp Architecture.

One thing that is bugging me a bit is that I don't have access to any of the ASP.Net MVC item templates from the "Add New Item..." dialog. In other words I can't, 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 items, then manipulate the markup and code-behind to setup the correct inheritance structure.

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

chyne
  • 657
  • 4
  • 9
  • You should have a Visual C# -> Web -> MVC option in your Add New Item dialog. – Todd Smith Dec 22 '08 at 15:56
  • You are right Todd. The thing is I had soft of ported the S#arp project template to VB.Net. I seem to have lost this ability in the translation. Gives me some place to start looking again though. Thanks! – chyne Dec 22 '08 at 16:05

1 Answers1

0

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

The ASP.Net MVC item templates should be available in the "Add New Item..." dialog, under Web -> MVC.

What I neglected to mention in my original question (because I didn't think it was relevant) was that I had converted the original S#arp Architecture project template to VB.Net (being a bit more comfortable working in VB.Net these days). Turns out I lost the ability to access ASP.Net MVC templates during my conversion.

The fix was simple. My VB.Net version of the SharpArch.Web project wasn't identified as an MVC project. I simply had to add the appropriate project type GUID (i.e. {603c0e0b-db56-11dc-be95-000d561079b0}) to the *.vbproj file:

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

Thanks Todd!

Community
  • 1
  • 1
chyne
  • 657
  • 4
  • 9
  • This didn't work for me, but this did -> http://stackoverflow.com/questions/1531120/asp-net-mvc-project-not-supported-by-this-installation. That first GUID always causes a cannot open this type of project error on load. – Kurt Johnson May 24 '10 at 17:25