ASP.NET MVC 4 Visual Studio 2010 project templates not present
Solution 1
Have you tried reinstalling the templates. Follow these directions.
http://msdn.microsoft.com/en-us/library/vstudio/ms247116(v=vs.100).aspx
short answer, open up visual studio command prompt and type:
devenv /installvstemplates
That should restore all your templates.
Solution 2
Check if Project Templates are installed:
- Manually search if you find the project template (it would be *.zip) inside %ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates\CSharp\Web\1033
- If YES, please run devenv.exe /installvstemplates
- If NO, then its guaranteed that the ProjectTemplates are not installed. You would have to reinstall to get the ProjectTemplates on your disk.
For the records:
All the installed project templates are available here: (this is the default path)
%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplates
This is where the File->New ->Project Dialog loads ProjectTemplates from, and is displayed in the Same Folder heirarchy convention. You could add another path by updating
Tools -> Options -> Projects and Solutions -> General -> User Project Template Location
On studio(devenv.exe) launch/loading it would try to create a ProjectTemplateCache on localappdata or %ProgramFiles% based on whether you are local user or admin. The cache inside Programfiles are available here
%ProgramFiles%\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache
This ProjectTemplateCache directory is Created (if doesnt exists) or Updated(if already exists) by running *devenv.exe /installvstemplates on cmd. This command is run during installation of Visual Studio. Ideally all other installers who ship project templates should run this command. But, sometimes this might fail due to access rights. So its is safe to run it again manually.
Comments
-
Brandon Miller almost 2 years
I have downloaded and installed all of the prerequisites for using MVC 4 with VS2010. The VS2010 SP1 update, ASP.NET MVC 4 for VS2010, SSDT for VS2010, and LocalDB. When I go to create a new website in VS2010, there should be an "ASP.NET MVC 4 Web Application" template, but there is not. How can I get the templates so I can start a new MVC 4 website in Visual Studio 2010?
-
15ee8f99-57ff-4f92-890c-b56153 about 11 yearsI hadn't thought of that. It turns out that the problem was embarrassingly simple: I was trying "File|Create New Web Site...", but I should've been going to "File|Create New Project..." instead. When I did that, the template option I wanted was right there.