5

I just ran into something in Visual Studio 2010 RC that wasn't previously happening (like, yesterday). No software changes here, but I did run into some muck yesterday when compiling that required a reboot.

I am unable to add LINQ to SQL classes to any project through the add dialog. I have created ASP.NET web sites, ASP.NET MVC projects - both of these as 'templated' and as 'empty' - and there appear to be no templates installed or available.

alt text http://bandofgeeks.net/blogimages/code/notemplate.png

I have made sure that the project targets the 4.0 Framework. I can easily add a new database and the ADO.NET entity framework templates are there.

As a workaround I can copy a DBML file to my project, delete all tables and sprocs, update the connection string and use the leftover shell (the designer works fine like this), but it's a pain.

Has anyone else had their templates drop? Figured out how to reinstall them?

tzenes
  • 1,699
  • 2
  • 15
  • 31
MisterJames
  • 3,306
  • 1
  • 30
  • 48
  • do you find the Linq-to-SQL classes if you type "LINQ" into the "Search installed templates" box at the top right?? – marc_s Apr 01 '10 at 18:48
  • no, nothing there. I've also tried the online templates and nothing there. I've even backed out or changed my scope and tried 'code', 'Visual C#', 'Data' and 'Web' to no avail. – MisterJames Apr 01 '10 at 18:50

1 Answers1

6

In previous versions of Visual Studio, you were able to "reset" the default template registration using this command line switch when launching VS:

devenv.exe /InstallVSTemplates

I haven't tried it with Visual Studio 2010 yet - but it might be worth a try! It's definitely available - see the MSDN docs on VS 2005 command line switches.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 1
    thanks marc, worked a treat. the switch isn't documented in the /? command line prompt, but this worked just the same. cheers, -jc – MisterJames Apr 01 '10 at 19:38