Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To upgrade a project created in an earlier version of Visual Studio, open the project in the latest version of Visual Studio. If you're still using an older version of Visual Studio side-by-side, you can choose not to upgrade your projects until you're ready to maintain compatibility with both versions.
In Visual Studio 2026, this experience is enhanced with a setup assistant. The setup assistant offers to install missing tools using the Visual Studio installer, and to stay on an older version or retarget your projects to the latest version. You can open the setup assistant in Solution Explorer by right-clicking your solution and selecting Retarget solution.
With the setup assistant open, choose an action for each target or select Retarget all to set all projects at once. Then select Apply to complete the upgrade in place. Once your projects are retargeted, they can't be converted back to the earlier version. It's good practice to make a backup copy of the existing project and solution files before upgrading them.
Note
Visual Studio 2022 and later have deprecated support for the upgrade of project types that have .dsw or .dsp extensions. You can use an earlier version of Visual Studio, such as Visual Studio 2019, to upgrade these projects, then upgrade them again in Visual Studio 2022 or later to use the latest tools and features of Visual Studio.
Upgrade reports
When you upgrade a project, you get an upgrade report. The report is also saved in your project folder as UpgradeLog.htm. The upgrade report shows a summary of what problems were found during conversion. It lists some information about changes that were made, including:
Project properties.
Include files.
Code that no longer compiles cleanly because of compiler conformance improvements or changes in the standard.
Code that relies on Visual Studio or Windows features that are no longer available. Or, header files that either aren't included in a default installation of Visual Studio, or were removed from the product.
Code that no longer compiles because of changes in APIs such as renamed APIs, changed function signatures, or deprecated functions.
Code that no longer compiles because of changes in diagnostics, such as a warning becoming an error
Linker errors because of libraries that were changed, especially when /NODEFAULTLIB is used.
Runtime errors or unexpected results because of behavior changes.
Errors that were introduced in the tools. If you find an issue, report it to the Microsoft C++ team through your normal support channels or by using the Visual Studio C++ Developer Community page.
Some upgraded projects and solutions can be built successfully without modification. However, most projects will likely require changes to both project settings and your source code. There's no single correct way to go about fixing these issues, but we recommend using a phased approach. Before you start, review Overview of potential upgrade issues for more information on many kinds of common errors.
Set the Platform Toolset, C++ Language Standard, and Windows SDK version (if applicable) to the preferred versions. (Project > Properties > Configuration Properties > General)
If you have lots of errors, you can temporarily turn off some options while you fix them. To turn off the
/permissive-option, use Project > Properties > Configuration Properties > C/C++ > Language. To turn off the code analysis option, use Project > Properties > Configuration Properties > Code Analysis.Ensure that all dependencies are present and that the include paths or library locations are correct. (Project > Properties > Configuration Properties > VC++ Directories)
Identify and fix errors caused by references to APIs that no longer exist.
Fix any remaining errors that prevent compilation. Refer to Overview of potential upgrade issues for fixes for common errors.
Turn
/permissive-back on and fix any new errors caused by non-conforming code that previously compiled in MSVC.Turn on code analysis to identify potential problems or outdated coding patterns that are no longer considered acceptable. If code analysis flags many errors, you can turn off some of the warnings to focus on the most important ones first. The IDE can help with Quick Fixes for some kinds of issues.
Consider other opportunities for modernizing the code. For example, replace custom data structures and algorithms with ones from the C++ standard library, or the Boost open-source library. By using standard features, you make it easier for others to maintain the code. You can be confident that this code has been well-tested and reviewed by many experts on the standards committee and the broader C++ community.
For hard-to-fix errors, you can search for solutions or post a question on Microsoft Learn Q&A. For problems in the C++ compiler and tools, try the C++ Developer Community website.
In this section
Overview of potential upgrade issues
Upgrade your code to the Universal CRT
Update WINVER and _WIN32_WINNT
Fix your dependencies on library internals
Floating-point migration issues
C++ features deprecated in Visual Studio
VCBuild vs. MSBuild
Port 3rd-party libraries
See also
What's New for Microsoft C++ in Visual Studio
Visual C++ change history 2003 - 2015
Nonstandard Behavior
Port data applications