Share via


How to: Enable Temporary Projects

Temporary projects are not always enabled in the Visual Studio development environment. Use these procedures to set up the development environment or configure your project templates to support temporary projects.

There are two requirements for temporary projects to work in the development environment:

  • The project template that you want to work on as a temporary project must support temporary projects. All Visual Basic, Visual C#, and Visual J# project templates support temporary projects by default.

  • In the Options dialog box, the Save new projects when created option must not be selected. Some Visual Studio profile settings select this option by default. See Working with Settings, for more information on Visual Studio profile settings.

Enabling temporary projects

If the project that you want to work with as a temporary project already supports temporary projects, you must change a setting in the Options dialog box to enable temporary projects.

To enable temporary projects in the development environment

  1. From the Tools menu, select Options.

  2. Expand the Projects and Solutions node, and select the General node.

  3. Make sure the Save new projects when created option is not selected.

  4. Click the OK button.

See General, Projects and Solutions, Options Dialog Box, for more information on options in this dialog box.

Customizing a template to support temporary projects

Templates are defined by a .vstemplate file inside of a template .zip file. The metadata contained in the .vstemplate file determines whether or not a template will support temporary projects. For more information on templates, see Visual Studio Templates.

To configure project templates to support temporary projects

  • In the .vstemplate file of the project template, set the PromptForSaveOnCreation element equal to true.

    Note

    Some project types do not allow temporary projects, and modifications to the PromptForSaveOnCreation element will be ignored.

See How to: Update Existing Templates and PromptForSaveOnCreation Element (Visual Studio Templates), for more information.

See Also

Tasks

How to: Save Temporary Projects

Concepts

Temporary Projects