Framework and References, Common Properties, <Projectname> Property Pages Dialog Box
Updated: July 2010
Use this property page to set references from a C++ project to .NET Framework assemblies, COM components, or external projects.
To open this property page, right-click the project in Solution Explorer, click Properties, expand the Common Properties node, and then select References.
By default for new projects, the targeted framework is set to .NET Framework 4. The IDE does not support modifying the targeted framework, but you can change it manually.
In the project file (.vcxproj), the default targeted framework is represented by the <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> property element. To change the targeted framework, unload the project, use a text editor to open the project file, and then change the value of the property element from v4.0 to another version that is installed on your server. For example, if you specify v3.5, which represents the .NET Framework 3.5, Visual Studio 2008 SP1 must be installed. Save and close the file, reload the project, and verify that the targeted framework is displayed in the property page. For more information, see How to: Modify the Target Framework and Platform Toolset.
The References pane displays a list of all the components that your project currently references, for example, .NET Framework assemblies, COM components, and external projects.
ActiveX Reference Properties
ActiveX reference properties are available only for references to COM components. These properties are displayed only when a COM component is selected in the References pane. The properties cannot be modified.
Assembly Reference Properties
Assembly reference properties are available only for references to .NET Framework assemblies. These properties are displayed only when a .NET Framework assembly is selected in the References pane. The properties cannot be modified.
Build Properties
The following properties let you specify how to build with references.
Project Reference Properties
The following properties define a project-to-project reference from the project that is selected in the References pane to another project, which typically is not in the same solution. The selected project is the dependent project and the other project is the independent project. As the result of creating a project-to-project reference, the independent project is built before the dependent project. A project reference applies to a specific dependent project, not the entire solution. For more information, see Project References.
Reference Properties
The following properties cannot be modified.
The <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> property element may be missing
if you used the Upgrade Wizard to upgrade the project from an earlier version of Visual Studio. The
TargetFrameworkVersion element should be placed underneath these two lines: (the GUID will be
different in your project file.)
<propertygroup label="Globals">
<projectguid>{96FD1FEF-8A07-44E6-9CC1-D4284218B186}</projectguid>
Therefore, if you want to target v2.0, it will look like this: (again, your GUID will be different.)
<propertygroup label="Globals">
<projectguid>{96FD1FEF-8A07-44E6-9CC1-D4284218B186}</projectguid>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
Do not change the declaration at the top of the vcxproj file where it says ToolsVersion="4.0".
- 4/14/2010
- MandatoryDefault
- 4/14/2010
- MandatoryDefault
