I followed this link to the letter for creating a new project template in Visual Studio for MVC3. Unfortunately, while the template shows up in the Dialog, when I click on it to create a new project, I get the "Exception from HRESULT: 0x80070002". I have no idea how to fix this.
One person in the thread mentioned that the /installvstemplates command has to be run as an Administrator. I've done that. Still doesn't work. This exception is beyond useless.
From a user who contacted Microsoft Support for the same issue (file not found on template) If not on 64-bit machine remove (x86) from folder names. Backup the entire ProjectTemplates folder before you start.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\VWDExpress\ProjectTemplates\CSharp\Web\1033 and copy any of the folders that have 'MVC' in the name from the second folder to the first (move the 3.1's to where the 3.0's were).
Once you've done that go up a few levels to the ProjectTemplates folder and do the same for the other code bases.
Visual Studio Developer Command Prompt as an administrator and run:
This should set up your
ProjectTemplatesCache folder correctly and fix the problem.
User contributions licensed under CC BY-SA 3.0