Silverlight Loader destroyed my C# project templates

Jun 18, 2009 at 8:42 AM

Hi there,

I downloaded the package and tried to install it by

  • Copying the zip file to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033
  • Running devenv.exe /InstallVSTemplates on the command line

Which resulted in a complete loss of all C# project templates. When I tried to create a new project in VS, I just received an error message that no template information could be found. The C# project templates list was empty (including no subfolders at all). Other project types and languages where still there. The following entry was logged in the event log:

"The global template information is out of date. Regenerate the templates by running 'devenv.exe /installvstemplates' or reinstalling the application.  Note: corrective action requires Administrator privileges."

Of course running that command did not fix anything. I spent like two hours searching the net for any clues, nothing worked. I ended up deleting the zip manually and doing a repair installation of Visual Studio 2008 which finally fixed the problem.

Great work!

P.S.: OS is Vista Ultimate 32-bit english, VS is 2008 professional, everything is fully up to date and patched, and yes, I do have some -- but not excessively many -- addons installed (like AnkhSVN, Mobile SDKs etc.).


Jun 18, 2009 at 4:14 PM
Edited Jun 18, 2009 at 4:22 PM

Hi there weasel, First thank you for the compliment and second, have you heard of RTFM?

Have you even bothered to read the getting started guide?

In what part of the getting started guide does it mention that you should run devenv.exe /InstallVSTemplates?

Does it say that you should copy it to the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Silverlight\1033

Or does it say that you should copy it to My Documents\Visual Studio 2008\ProjectTemplates\Visual C#\?


Jun 18, 2009 at 4:35 PM

Ok, you're right, I screwed up. The thing is: I double-checked if there's a readme file included, and I was actually searching the project page for directions, visited the externally linked sample pages, but for reasons beyond me I did not scroll past the examples sections on the main page - purely my fault, and for that I'm apologizing.

But may I still leave some comment: I consider myself an experienced user (yes, that's probably the dangerous part). It's not the first time I had installed custom templates, I just did what I had done before with others, and that worked without problems for me until today. I even read through the included vstemplate file and compared it to the default silverlight project template vstemplate files, which drove me to the conclusion where I had to put the archive. The fact that this simple mistake was able to corrupt my VS installation should at least give you a hint that it would be a good idea to place your instructions at a more prominent place, probably even include a readme.

Sorry again.

Jun 18, 2009 at 8:16 PM
Edited Jun 18, 2009 at 8:18 PM

NP, I understand. It happened to all of us as some point or another.

Thank you for your comment.

In any case I am really surprised that VS installation would act like this.

If this was caused by the project template, you seem to have stumbled on a bug that should be reported to MS.