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:
Custom Templates
By default, custom templates are located at:
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:
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