Pablo Galiano : Faster devenv /setup

Subscriptions

<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789

News

Subscribe to Pablo Galiano by Email

Post Categories

Faster devenv /setup

devenv /setup basically means "Reset" VS. Several things happen when we do a devenv /setup:

  • The VS menus are recreated
    • <all user profile path>\All Users\Application Data\Microsoft\VisualStudio\9.0\<Locale>\devenv.CTM
  • The toolbox is recreated
    • <user profile path>\Local Settings\Application Data\Microsoft\VisualStudio\9.0\toolbox.tbd
  • VS templates cache are recreated

You may already noticed that devenv /setup takes a lot of time to process, and this is because the Vs templates recreation step.

Since VS 2005, VS templates are installed as .zip files on certain know locations:

Installed Templates

By default, templates installed with the product are located at:

  • <VisualStudioInstallDir>\Common7\IDE\ItemTemplates\<Language>\<Locale>

  • <VisualStudioInstallDir>\Common7\IDE\ProjectTemplates\<Language>\<Locale>

Custom Templates

By default, custom templates are located at:

  • My Documents\Visual Studio 2008\Templates\ProjectTemplates\<Language>\

  • My Documents\Visual Studio 2008\Templates\ItemTemplates\<Language>\

 

Recreating the VS templates means to transverse all know locations for installed templates (custom templates dont follow this rule), extract every zip file found and copy it to a directory ending with "Cache", for ex:

  • <VisualStudioInstallDir>\Common7\IDE\ItemTemplatesCache

  • <VisualStudioInstallDir>\Common7\IDE\ProjectTemplatesCache

 

Fortunately with Orcas there is a new devenv switch:

"devenv /setup /nosetupvstemplates"

 

The Microsoft.VsSDK.targets is smart enough to use the switch as part of the build process when necessary. Necessary means no updates to the .vsct file or no updates to vs templates.

One thing to notice is that the old Microsoft.VsSDK.targets was smart too. For ex. if you didn't modify the .ctc file, the devenv /setup was not going to be executed.

 

Pablo

posted on Monday, October 01, 2007 8:01 PM by pga