Dela via


Visual Studio Settings

In Visual Studio, customizations of the integrated development environment (IDE) are stored in groupings known as settings. Settings may be based on different kinds of development activities and also on your own customizations. Examples of things you can customize and then keep in settings include tool window visibility, window layouts, placement of menu commands, menu names, template availability in the New Projects dialog box, predefined keyboard shortcuts, and Help filters.

By using settings, you can do the following:

  • Create a copy of your active settings for use on a second computer.

  • Share your active settings with other developers.

  • Let all team members use the same settings for particular parts of the IDE without removing individual customizations to other parts.

  • Migrate your settings to another version of Visual Studio.

This topic explains the following:

  • What are settings?

  • How do settings work?

  • Migrating settings

  • Settings and security

What are settings?

Settings are customizations to the IDE, such as window layouts, editor defaults, IntelliSense code snippets, and available dialog box options that you can save, export, import, or reset to make the IDE easier to use.

Your active settings consist of two parts: predefined customizations from the installed .vssettings file that you selected the first time that you started Visual Studio and any subsequent IDE customizations that you have made. By default, active settings are saved in Currentsettings.vssettings.

For more information about the predefined settings available with Visual Studio, see the following topics.

How do settings work?

When you first start Visual Studio, you must select a settings collection that contains predefined settings designed to match your development habits. If you upgrade to another edition of Visual Studio, you are also given the option of applying the other edition's settings by using the My Previous Settings option. The settings collection is the first element of your active settings. Each time that you make an adjustment to a setting tracked by Visual Studio, such as change the color of commented code in the editor, the change is automatically saved to Currentsettings.vssettings together with the predefined settings. Visual Studio applies your active settings automatically every time that you start Visual Studio.

In some cases, you can change the settings applied as part of a predefined collection. For example, if a settings collection simplified the Options dialog box by hiding pages, you can display those pages manually by selecting Show all settings. In other cases, you cannot override the predefined setting without applying a different collection. For information about how to apply different settings collections, see How to: Change Select Settings.

You can replace all of your active settings or just some of them. By importing a .vssettings file that contains all possible settings categories or by applying another settings collection, you can replace all your active settings. By importing a .vssettings file that contains a subset of settings categories or by clearing settings categories in an imported .vssettings file, you can replace only those settings that are selected and leave your other active settings intact.

Help and Settings

Predefined settings collections also provide customizations to Help. Settings specify the default How Do I page in Help. The selected How Do I page filters the content that appears in the Table of Contents and in the Index, and provides customized content on the How Do I tab. You can change the active How Do I page from the Other How Do I Pages drop-down list.

Migrating Settings

Visual Studio 2008 includes support for migrating your settings from an earlier release of Visual Studio.

Note

Some settings may not migrate. For example, if you try to migrate settings from a Team System edition of Visual Studio to a Professional edition, not all of them would migrate because the Professional edition does not have the same features. Similarly, if a settings category has changed between releases, those settings may not migrate correctly.

Automatic Migration

If you have side-by-side installations of Visual Studio 2005 and Visual Studio 2008 on the same computer, you can have your Visual Studio 2005 settings migrated automatically to Visual Studio 2008. The first time that you start Visual Studio 2008, the Choose Default Environment Settings Dialog Box displays the following option: Migrate my eligible settings from a previous version and apply them in addition to the default settings selected below. Select this option to automatically migrate your Visual Studio 2005 settings, including custom IntelliSense code snippet paths and snippets located in \My Documents\Visual Studio 2005\Code Snippets\, for use in Visual Studio 2008. 

Note

Team settings cannot be migrated.

You can also choose to manually migrate your settings.

Manual Migration

You can use the Import and Export Settings wizard to import and apply settings from Visual Studio 2005 to Visual Studio 2008. For more information, see How to: Share Settings Between Computers or Visual Studio Versions.

Settings and Security

Some settings categories can contain information about you or your computer that might be a security issue if you share your settings with others. For example, if you have customized the IDE to save projects to a network share, the path of that share is tracked in your currentsettings.vssettings file. If you exported this file to share with others, anyone who imported your settings would also be pointed to this network share. That could pose a risk to your intellectual property. Conversely, if you plan to import settings provided by others, you should know about the categories in the imported file that could be a security issue.

An icon appears next to those categories with potential security issues. These settings categories include the following:

  • External Tools Lists

  • Command Window Aliases

See Also

Other Resources

Working with Settings