With the recent update to the ASP.NET MVC Framework, you may have applications that you've built with the first CTP that you'd like to upgrade to the new CTP2.  Microsoft has posted instructions on how to upgrade your project.

I followed the instuctions, but I was noticing that when I tried to add new items to my project such as a new View Content Page, etc. the Add New Item dialog wasn't listing the MVC project items.  One of the changes in the new CTP has put the MVC project items into their own grouping in the dialog, which is very handy.  However, they weren't showing up in the upgraded project.  They should be under Web | MVC.

In order to see the MVC project items you have to update the <ProjectTypeGuids> element in your .csproj file.  The new values should be:


<ProjectTypeGuids>
  {603c0e0b-db56-11dc-be95-000d561079b0};
  {349c5851-65df-11da-9384-00065b846f21};
  {fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>

Note that I've written it here on several lines for readability, but in your .csproj file it must be all on one line like this:


<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

That lets the designer know to give you the correct items types in your Add New Item dialog. Thanks to Andrew for the help in getting this working.

posted on Tuesday, March 11, 2008 5:07 PM |

Comments

3/18/2008 4:01 PM

Lance, thanks for posting... this will save me countless WTF moments... I noticed the first Guid was missing on your BoiseCodeCamp download, just a FYI..

Thanks again.

3/19/2008 12:41 AM

Hi Mike, it is missing from the Code Camp download, but that's because it's not an MVC app. I was scratching my head for a minute there :)

3/19/2008 9:35 PM

oops, sorry my bad! I actually just noticed that myself this afternoon. I've looked at WAY too much code the past couple of weeks

Sorry to make you second guess..

6/6/2008 4:25 AM

good information.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 3 and 1 and type the answer here: