A couple of weeks ago Microsoft released the ASP.NET MVC 3 Tools Update which includes new project templates for VS MVC projects – making my older post of How to Add MVC 3 Project Types to the Azure Cloud Service Wizard old and busted. So this is a refresh of that post.
The MVC 3 Tools Update comes with 6 new project templates and ties in NuGet packages … however like before I took the easy way out (ie. didn’t write my own Cloud Service Wizard). What that means:
- For the templates to work you need to have EF 4.1 installed since NuGet package syntax isn’t supported by the Cloud Service Wizard (link to the EF 4.1 stand alone installer is below)
- I did not create items for the new MVC Intranet project templates.
After you follow the steps below you’ll get a dialog with the new project templates available for web roles when you create a new Cloud Service project, like shown below:

Step 0: Get the templates
Download the templates you need from my site:
NOTE: I did not include the Test Project Template in this set of instructions. If you want the Test Project template available to add to you MVC project, you can follow the instructions on the previous post: How to Add MVC 3 Project Types to the Azure Cloud Service Wizard. They did create a new test project for the 3.01 release, but very little changed (the AccountController tests are now gone) – so the previous download and instructions should work fine still.
Step 1: Get Entity Framework 4.1
Download and run the Entity Framework 4.1 standalone installer (this way you don’t have to wire up NuGet packages after you create your cloud service MVC web role.
Step 2: Put the Item Templates where VS will use them
Copy the zip files you downloaded to the following directory: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CloudService\NETFramework4\Web Role\Visual C#
My directory has all the templates and looks like this afterwards:

Step 3: Delete the contents of the ItemTemplateCache directory
The step may be optional, but I did it – feel free to try and skip it, If you find the templates are not showing up in the dialog, you can come back and do Steps 3 and 4 at that time.
Find the ItemsTemplatesCache directory (C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplatesCache) and delete all the contents in it.
Step 4: Rebuild Visual Studio’s template cache
Open a VS Command Prompt (found under Visual Studio 10 –> Visual Studio Tools on you start menu).
Run the command: devenv.exe /installvstemplates
This will take awhile – on my machine it takes between 5 and 15 minutes.