Skip to content

Commit 5574601

Browse files
author
mikeblome
committed
intermediate checkin
1 parent 25dfb36 commit 5574601

File tree

4 files changed

+69
-70
lines changed

4 files changed

+69
-70
lines changed

docs/build/creating-and-managing-visual-cpp-projects.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "Visual Studio Projects - C++"
3-
ms.date: "12/12/2018"
3+
ms.date: "10/25/2019"
44
helpviewer_keywords: ["ATL projects, creating", "Visual Studio C++ projects, creating", "projects [C++], creating", "Visual Studio C++ projects", "ATL projects"]
55
ms.assetid: 11003cd8-9046-4630-a189-a32bf3b88047
66
---
77
# Visual Studio projects - C++
88

9-
A *Visual Studio project* is a project based on the MSBuild build system. MSBuild is the native build system for Visual Studio and is generally the best build system to use for UWP apps as well as Desktop applications that use MFC or ATL libraries, COM components, and other Windows-specific programs. MSBuild is tightly integrated with Visual Studio, but you can also use it from the command line.
9+
A *Visual Studio project* is a project based on the MSBuild build system. MSBuild is the native build system for Visual Studio and is generally the best build system to use for Windows-specific programs. MSBuild is tightly integrated with Visual Studio, but you can also use it from the command line. For cross-platform projects, or projects that use open-source libraries, we recommend using [CMake projects in Visual Studio](cmake-projects-in-visual-studio.md) in Visual Studio 2017 and later. For information about upgrading MSBuild projects from older versions of Visual Studio, see the [Microsoft C++ Porting and Upgrading Guide](../porting/visual-cpp-porting-and-upgrading-guide.md).
1010

1111
## Create a project
1212

@@ -76,3 +76,4 @@ How to create a new Visual Studio project from a loose collection of source file
7676
## See also
7777

7878
[Projects and build systems](projects-and-build-systems-cpp.md)<br>
79+
[Microsoft C++ Porting and Upgrading Guide](../porting/visual-cpp-porting-and-upgrading-guide.md)

docs/porting/build-system-changes.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
11
---
22
title: "Build System Changes in Visual Studio 2010"
3-
ms.date: "11/04/2016"
4-
f1_keywords: ["vc.msbuild.changes"]
3+
ms.date: "10/25/2019"
54
helpviewer_keywords: ["Build system changes, project file (.vcxprog)", "Build system changes, custom build rules", "Build system changes, MSBuild", "MSBuild, build system changes", "Build system changes, .vsprops", "Build system changes, $(Inherit)", "Build system changes, $(NoInherit)"]
65
ms.assetid: e564d95f-a6cc-4d97-b57e-1a71daf66f4a
76
---
8-
# Build System Changes
7+
# Build System Changes in Visual Studio 2010
98

10-
The MSBuild system is used to build Visual Studio C++ projects. However, in Visual Studio 2008 and earlier releases, the VCBuild system was used. Certain file types and concepts that depended on VCBuild either do not exist or are represented differently in the current system. This document discusses the differences in the current build system.
9+
The MSBuild system for C++ projects was introduced in Visual Studio 2010. In Visual Studio 2008 and earlier releases, the VCBuild system was used. Certain file types and concepts that depended on VCBuild either do not exist or are represented differently in MSBuild. This document discusses the differences in the current build system. To convert a Visual Studio 2008 project to MSBuild, you must use Visual Studio 2010. After the project is converted, you should use the latest version of Visual Studio to upgrade the to the current IDE and compiler toolset. For more information, including how to obtain Visual Studio 2010, see [Instructions for Visual Studio 2008](use-native-multi-targeting.md#instructions-for-visual-studio-2008).
1110

12-
## .vcproj is now .vcxproj
11+
The following sections summarize the changes from VCBuild to MSBuild. If your VCBuild project has custom build rules or macros that aren't recognized by MSBuild, see [Visual Studio Projects - C++](../build/creating-and-managing-visual-cpp-projects.md) to learn how to translate those instructions to the MSBuild system. The initial conversion from VCBuild to MSBuild is just an intermediate step. It isn't necessary to get the project file completely correct or to get the program to compile without errors. You are only using Visual Studio 2010 to convert the project to MSBuild format so that you get the project working in the latest version of Visual Studio.
1312

14-
Project files no longer use the .vcproj file name extension. Visual Studio automatically converts project files that were created by an earlier release of Visual C++ to the format that is used by the current system. For more information about how to manually upgrade a project, see [/Upgrade (devenv.exe)](/visualstudio/ide/reference/upgrade-devenv-exe).
13+
## .vcproj is now .vcxproj
1514

16-
In the current release, the file name extension for a project file is .vcxproj.
15+
Project files no longer use the .vcproj file name extension. Visual Studio 2010 automatically converts project files that were created by an earlier release of Visual C++ to the MSBuild format, which uses the .vcxproj extension for project files.
1716

1817
## .vsprops is now .props
1918

20-
In earlier releases, a *project property sheet* is an XML-based file that has a .vsprops file name extension. A project property sheet lets you specify switches for build tools such as the compiler or linker and create user-defined macros.
19+
In Visual Studio 2008 and earlier, a *project property sheet* is an XML-based file that has a .vsprops file name extension. A project property sheet lets you specify switches for build tools such as the compiler or linker and create user-defined macros. In MSBuild, the file name extension for a project property sheet is .props.
2120

22-
In the current release, the file name extension for a project property sheet is .props.
21+
## Custom build rules and .rules files
2322

24-
## Custom Build Rules and .rules Files
23+
In Visual Studio 2008 and earlier, a *rule file* is an XML-based file that has a .rules file name extension. A rule file lets you define custom build rules and incorporate them into the build process of a Visual Studio C++ project. A custom build rule, which can be associated with one or more file name extensions, lets you pass input files to a tool that creates one or more output files.
2524

26-
In earlier releases, a *rule file* is an XML-based file that has a .rules file name extension. A rule file lets you define custom build rules and incorporate them into the build process of a Visual Studio C++ project. A custom build rule, which can be associated with one or more file name extensions, lets you pass input files to a tool that creates one or more output files.
27-
28-
In this release, custom build rules are represented by three file types, .xml, .props, and .targets, instead of a .rules file. When a .rules file that was created by using an earlier release of Visual C++ is migrated to the current release, equivalent .xml, .props, and .targets files are created and stored in your project together with the original .rules file.
25+
In the MSBuild system, custom build rules are represented by three file types, .xml, .props, and .targets, instead of a .rules file. When a .rules file that was created by using an earlier release of Visual C++ is migrated to Visual Studio 2010, equivalent .xml, .props, and .targets files are created and stored in your project together with the original .rules file.
2926

3027
> [!IMPORTANT]
31-
> In the current release, the IDE does not support the creation of new rules. For that reason, the easiest way to use a rule file from a project that was created by using an earlier release of Visual C++ is to migrate the project to the current release.
28+
> In Visual Studio 2010, the IDE does not support the creation of new rules. For that reason, the easiest way to use a rule file from a project that was created by using an earlier release of Visual C++ is to migrate the project to Visual Studio 2010.
3229
33-
## Inheritance Macros
30+
## Inheritance macros
3431

35-
In earlier releases, the **$(Inherit)** macro specifies the order in which inherited properties appear on the command line that is composed by the project build system. The **$(NoInherit)** macro causes any occurrences of $(Inherit) to be ignored and causes any properties that would otherwise be inherited, not to be inherited. For example, by default the $(Inherit) macro causes files specified by using the [/I (Additional Include Directories)](../build/reference/i-additional-include-directories.md) compiler option to be appended to the command line.
32+
In Visual Studio 2008 and earlier, the **$(Inherit)** macro specifies the order in which inherited properties appear on the command line that is composed by the project build system. The **$(NoInherit)** macro causes any occurrences of $(Inherit) to be ignored and causes any properties that would otherwise be inherited, not to be inherited. For example, by default the $(Inherit) macro causes files specified by using the [/I (Additional Include Directories)](../build/reference/i-additional-include-directories.md) compiler option to be appended to the command line.
3633

37-
In the current release, inheritance is supported by specifying the value of a property as the concatenation of one or more literal values and property macros. The **$(Inherit)** and **$(NoInherit)** macros are not supported.
34+
In Visual Studio 2010, inheritance is supported by specifying the value of a property as the concatenation of one or more literal values and property macros. The **$(Inherit)** and **$(NoInherit)** macros are not supported.
3835

3936
In the following example, a semicolon-delimited list is assigned to a property on a property page. The list consists of the concatenation of the *\<value>* literal and the value of the `MyProperty` property, which is accessed by using the macro notation, **$(**<em>MyProperty</em>**)**.
4037

4138
```
4239
Property=<value>;$(MyProperty)
4340
```
4441

45-
## .vcxproj.user Files
42+
## .vcxproj.user files
4643

47-
A user file (.vcxproj.user) stores user-specific properties, for example, debugging and deployment settings. The vcxproj.user file applies to all projects for a particular user.
44+
A user file (.vcxproj.user) stores user-specific properties, for example, debugging and deployment settings. The *vcxproj.user* file applies to all projects for a particular user.
4845

49-
## .vcxproj.filters File
46+
## .vcxproj.filters file
5047

51-
When **Solution Explorer** is used to add a file to a project, the filters file (.vcxproj.filters) defines where in the **Solution Explorer** tree view the file is added, based on its file name extension.
48+
When **Solution Explorer** is used to add a file to a project, the filters file (*.vcxproj.filters*) defines where in the **Solution Explorer** tree view the file is added, based on its file name extension.
5249

53-
## VC++ Directories Settings
50+
## VC++ Directories settings
5451

55-
Visual C++ directories settings are specified on the [VC++ Directories Property Page](../ide/vcpp-directories-property-page.md). In earlier releases of Visual Studio, directories settings apply per-user and the list of excluded directories is specified in the sysincl.dat file.
52+
Visual C++ directories settings are specified on the [VC++ Directories Property Page](../ide/vcpp-directories-property-page.md). In Visual Studio 2008 and earlier, directories settings apply per-user and the list of excluded directories is specified in the *sysincl.dat* file.
5653

5754
You cannot change the VC++ directories settings if you run [devenv /resetsettings](/visualstudio/ide/reference/resetsettings-devenv-exe) at the command line. You also cannot change the settings if you open the **Tools** menu, click **Import and Export Settings**, and then select the **Reset all settings** option.
5855

59-
Migrate VC++ directories settings from a .vssettings file that is created by an earlier release of Visual C++. Open the **Tools** menu, click **Import and Export Settings**, select **Import selected environment settings**, and then follow the directions in the wizard. Or when you start Visual Studio for the first time, on the **Choose Default Environment Settings** dialog box, select **Migrate my eligible settings from a previous version and apply them in addition to the default settings selected below**.
56+
To migrate VC++ directories settings from a *.vssettings* file that was created by an earlier release of Visual Studio:
57+
58+
1. Open the **Tools** menu, click **Import and Export Settings**
59+
2. Select **Import selected environment settings**
60+
3. Follow the directions in the wizard.
6061

6162
## See also
6263

docs/porting/upgrading-projects-from-earlier-versions-of-visual-cpp.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
11
---
2-
title: "Upgrading Projects from Earlier Versions of Visual C++"
2+
title: "Upgrading C++ projects from earlier versions of Visual Studio"
33
description: "How to upgrade Microsoft C++ projects from older versions of Visual Studio."
4-
ms.date: "10/23/2019"
4+
ms.date: "10/25/2019"
55
helpviewer_keywords: ["32-bit code porting", "upgrading Visual C++ applications, 32-bit code"]
66
ms.assetid: 18cdacaa-4742-43db-9e4c-2d9e73d8cc84
77
---
8-
# Upgrading Projects from Earlier Versions of Visual C++
8+
# Upgrading C++ projects from earlier versions of Visual Studio
99

10-
In most cases, you can open a project that was created in an earlier version of Visual Studio. However, to accomplish this, Visual Studio upgrades the project. If you save this upgraded project, it cannot be opened in the earlier version.
10+
To upgrade a project created in Visual Studio 2008 or earlier, you must first use Visual Studio 2010 to convert the project from the VCBuild to the MSBuild format. For more information, see [Instructions for Visual Studio 2008](use-native-multi-targeting.md#instructions-for-visual-studio-2008).
1111

12-
> [!IMPORTANT]
13-
> If you try to convert a project that was already converted, Visual Studio asks for confirmation because reconversion deletes existing files.
12+
To upgrade a project created in Visual Studio 2010 or later, simply open the project in the latest version of Visual Studio. Visual Studio offers to upgrade the project to the current schema. If you choose **No**, and you have the older version of Visual Studio on your computer, you can work in the project in a newer version of Visual Studio and continue to target the older toolset. For more information, see [Use native multi-targeting in Visual Studio to build old projects](use-native-multi-targeting.md). If you choose **Yes**, then the project will be converted and cannot be converted back to the earlier version. Therefore, in upgrade scenarios, it is good practice to make a copy of the existing project and solution files.
1413

15-
Many upgraded projects and solutions can be built successfully without modification. However, some projects might require changes to settings, source code, or both. We recommend that you use the following guidelines to address the settings issues first, and then if the project still doesn't build, you can address the code issues. For more information, see [Overview of potential upgrade issues](../porting/overview-of-potential-upgrade-issues-visual-cpp.md).
14+
If your project must continue to run on Windows XP, you can upgrade it to Visual Studio 2019, but you have to specify the toolset as v141 or earlier.
1615

17-
1. Make a copy of the existing project and solution files. Install the current version of Visual Studio and the earlier version side by side so that you can compare versions of the files if you want to.
16+
## Upgrade reports
1817

19-
2. In the current version of Visual Studio, open the copy of the project or solution. Visual Studio will offer to upgrade it. When that process completes, save the project.
18+
When you upgrade a project, you get an upgrade report, which is also saved in your project folder as UpgradeLog.htm. The upgrade report shows a summary of what problems were encountered and some information about changes that were made, including:
2019

21-
3. For each converted project, open the shortcut menu and choose **Properties**. Under **Configuration Properties**, select **General** and then for **Platform Toolset**, select the current version. (For example, for Visual Studio 2019, select **v142**.)
20+
1. Project properties
2221

23-
4. Build the solution. If the build fails, fix the errors, and/or modify the build settings and rebuild.
22+
2. Include files
2423

25-
Data sources are contained in a separate database project so that you can more easily modify and debug the stored procedures in those sources. If you upgrade a C++ project that contains data sources, a separate database project is automatically created.
24+
3. Code that no longer compiles cleanly due to compiler conformance improvements or changes in the standard
2625

27-
For information about how to update the targeted Windows versions, see [Modifying WINVER and _WIN32_WINNT](../porting/modifying-winver-and-win32-winnt.md).
26+
4. 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
27+
28+
5. Code that no longer compiles due to changes in APIs such as renamed APIs, changed function signatures, or deprecated functions
29+
30+
6. Code that no longer compiles due to changes in diagnostics, such as a warning becoming an error
31+
32+
7. Linker errors due to libraries that were changed, especially when /NODEFAULTLIB is used
33+
34+
8. Runtime errors or unexpected results due to behavior changes
35+
36+
9. Errors that were introduced in the tools. If you encounter an issue, report it to the Visual C++ team through your normal support channels or by using the [Visual Studio C++ Developer Community](https://developercommunity.visualstudio.com/spaces/62/index.html) page.
37+
38+
Many upgraded projects and solutions can be built successfully without modification. However, the older the project, the more likely that it will require changes to project settings as well as source code. The C++ code editor displays red squiggles under the errors, and green squiggles to indicate warnings flagged by the default code analysis tools.
39+
40+
We recommend that you use the following guidelines to address the settings issues first, and then if the project still doesn't build, you can address the code issues. For more information, see [Overview of potential upgrade issues](../porting/overview-of-potential-upgrade-issues-visual-cpp.md).
2841

2942
## In this section
3043

0 commit comments

Comments
 (0)