|
1 | 1 | --- |
2 | 2 | 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" |
5 | 4 | 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)"] |
6 | 5 | ms.assetid: e564d95f-a6cc-4d97-b57e-1a71daf66f4a |
7 | 6 | --- |
8 | | -# Build System Changes |
| 7 | +# Build System Changes in Visual Studio 2010 |
9 | 8 |
|
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). |
11 | 10 |
|
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. |
13 | 12 |
|
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 |
15 | 14 |
|
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. |
17 | 16 |
|
18 | 17 | ## .vsprops is now .props |
19 | 18 |
|
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. |
21 | 20 |
|
22 | | -In the current release, the file name extension for a project property sheet is .props. |
| 21 | +## Custom build rules and .rules files |
23 | 22 |
|
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. |
25 | 24 |
|
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. |
29 | 26 |
|
30 | 27 | > [!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. |
32 | 29 |
|
33 | | -## Inheritance Macros |
| 30 | +## Inheritance macros |
34 | 31 |
|
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. |
36 | 33 |
|
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. |
38 | 35 |
|
39 | 36 | 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>**)**. |
40 | 37 |
|
41 | 38 | ``` |
42 | 39 | Property=<value>;$(MyProperty) |
43 | 40 | ``` |
44 | 41 |
|
45 | | -## .vcxproj.user Files |
| 42 | +## .vcxproj.user files |
46 | 43 |
|
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. |
48 | 45 |
|
49 | | -## .vcxproj.filters File |
| 46 | +## .vcxproj.filters file |
50 | 47 |
|
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. |
52 | 49 |
|
53 | | -## VC++ Directories Settings |
| 50 | +## VC++ Directories settings |
54 | 51 |
|
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. |
56 | 53 |
|
57 | 54 | 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. |
58 | 55 |
|
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. |
60 | 61 |
|
61 | 62 | ## See also |
62 | 63 |
|
|
0 commit comments