Partager via


/Upgrade (devenv.exe)

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Updates the solution file and all of its project files, or the project file specified, to the current Visual Studio formats for these files.

Syntax

devenv {SolutionFile|ProjectFile} /Upgrade [/Out OutputFilename]

Arguments

  • SolutionFile

    Required if you're upgrading an entire solution and its projects. The path and name of a solution file. You can enter just the name of the solution file, or a full path and the name of the solution file. If the folder or file named doesn't yet exist, it's created.

  • ProjectFile

    Required if you're upgrading a single project. The path and name of a project file within the solution. You can enter just the name of the project file, or a full path and the name of the project file. If the folder or file named doesn't yet exist, it's created.

  • /Out OutputFilename

    Optional. The name of a file that you want to send the tool's output to. If the file already exists, the tool appends the output to the end of the file.

Remarks

Backups are automatically created and copied to a directory named Backup that's created in the current directory.

Source-controlled solutions or projects must be checked out before they can be upgraded.

Using the /Upgrade switch doesn't open Visual Studio. Results of the upgrade can be seen in the Upgrade Report for the development language of the solution or project. No error or usage info is returned. For more information on upgrading projects in Visual Studio, see Port, Migrate, and Upgrade Visual Studio Projects.

Example

This example upgrades a solution file named "MyProject.sln".

devenv "%USERPROFILE%\source\repos\MyProject\MyProject.sln" /upgrade

See also