Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 Can't find templates

After installing Visual Studio 2012 RTM on top of Visual Studio 2012 RC and creating a new ASP.Net Empty Web Application project, I am unable to add a New Web Form to my project. When attempting to add a new Web Form, I receive the error message:

Could not find a part of the path ....\WebForm.zip\WebForm.vstemplate

This problem is listed on the connect site here:

https://connect.microsoft.com/VisualStudio/feedback/details/758581/could-not-find-itemtemplate-path

I can't register the workaround there, so I'm going to do it here, so hopefully someone else can find this. (Anyone know why the d@mnded register link doesn't work?)

Update: I had to do this for the Class template also: (My path)

 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\ide\ItemTemplatesCache\web\csharp\1033\Class
Copied the Class folder and renamed it Class.zip

.

like image 709
Chris Weber Avatar asked Aug 20 '12 20:08

Chris Weber


People also ask

Where can I find templates in Visual Studio?

Visual Studio templates Item templates, such as code files, XML files, HTML pages, and Style Sheets, appear in the Add New Item window. These templates provide a starting point for users to begin creating projects, or to expand existing projects.

Where are .NET templates stored?

csproj file and templates folder are both located at the root of a directory named project_folder.


1 Answers

To workaround this issue:

  1. Open an explorer window to the path. In my case the path is C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\ide\ItemTemplatesCache\web\csharp\1033

  2. Make a copy of the WebForm folder and name the copy WebForm.zip.

  3. Try to add a new web form to the project. It should succeed this time.

like image 195
Chris Weber Avatar answered Sep 29 '22 21:09

Chris Weber