After updating to 126.96.36.199 last night, I can’t add an empty page to my test project (see 1.jpg). I was not able to do a screen grab but it says “Can’t find the file ‘EmptyPage.cs’ in C:\Users\<UserName>\AppData\Roaming\Microsoft\VisualStudio\14.0\ItemTemplatesCache\Visual C#\Wisej. I did try to click “New Item” instead and “Empty Page” is not available (see 2.jpg).
I tried ‘remove’, ‘install’ using the wisej.exe, restart the machine for several times to no avail. Getting frustrated and running out of ideas what went wrong with the update, I downloaded a new installer.
After installing, it gets worst. I can’t even create a new project (see 3.jpg). “Tried to repair the product to fix this issue” but nothing happened. VS is still looking for the template in C:\Users\<UserName>\AppData\………”, but the new installer I had just downloaded and used changed the location of the templates to C:\Users\Administrator\Documents\Visual Studio 2015\Templates\ProjectTemplates\Visual C#.
So upset today.?
Just have to go to Martin’s Tavern early till eternity. ?
We don’t do anything special with the templates. The installer simply copies the files in the standard template location, under the user folder. Everything else is VS.
There is a second way to install templates, not recommended by MS, which is to copy them to a similar template folder located in the VS installation path. The end result is the same without the security warning. The problem for the installer is to determine where VS is installed in case it’s not in the default location.
Same goes for the toolbox. Older versions of VS required a poorly documented macro to add the tools. Since VS2010 they added a toolbox installer that reads the files from the registry. Any installer simply adds registry entries and VS breaks the rest.
Trying to control VS with alternative installation systems creates more problems. So we are sticking to the plain vanilla approach.
VS can be a PITA, until you try to use Eclipse! 🙂
Thanks for your help and feel sorry for spoiling your weekend.
It worked but for curiosity sake, I restored my system backup, removed Wisej and deleted all traces of Wisej folder to have a clean start. I then reinstall Wisej and you are correct, that templates are installed in user’s document folder and nothing had changed in the installer. When I opened VS, and clicked on Wisej to create a new project, project templates are then automatically copied into AppData folder. Item templates are also copied to AppData folder when you click Add -> New Item.
Having said that, there are now two places in my machine where project templates and item templates are stored. The templates in AppData are the one being used everytime I create a project and add an item.
Just wondering now why I have two copies of the templates and I do not know if this is a VS or Wisej strategy.
Looks like a VS template cache issue. The installer didn’t change the location, it’s always in the current user’s folder: C:\Users\<User Name>\Documents\Visual Studio 2015\Templates\ProjectTemplates. That’s the default installation location for templates.
Can you try
It needs to run from the command prompt with the VS path as Administrator. VS 2015 is here:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE>
It should clear and reinstall the valid templates only.
Let me know.