Share via


VCProject.TargetFrameworkVersion Property

Gets or sets the version of the .NET Framework that is targeted by the project.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Syntax

'Declaration
Property TargetFrameworkVersion As enumFrameworkVersion
enumFrameworkVersion TargetFrameworkVersion { get; set; }
property enumFrameworkVersion TargetFrameworkVersion {
    enumFrameworkVersion get ();
    void set (enumFrameworkVersion value);
}
abstract TargetFrameworkVersion : enumFrameworkVersion with get, set
function get TargetFrameworkVersion () : enumFrameworkVersion 
function set TargetFrameworkVersion (value : enumFrameworkVersion)

Property Value

Type: Microsoft.VisualStudio.VCProjectEngine.enumFrameworkVersion
An enumFrameworkVersion value representing the .NET Framework version.

Remarks

In Visual Studio 2008, projects can be set to target a specific .NET Framework version. This value can be set or read by TargetFrameworkVersion.

The references of a project are configuration independent. Because the TargetFrameworkVersion property specifically relates to references, it is also configuration independent.

An "unknown" enum value is not supported for this property.

Each assembly reference has a property associated with it called "MinFrameworkVersion" whose type is the same type as that of the project's TargetFrameworkVersion.

.NET Framework Security

See Also

Reference

VCProject Interface

Microsoft.VisualStudio.VCProjectEngine Namespace

MinFrameworkVersion

MinFrameworkVersion

MinFrameworkVersion

MinFrameworkVersion

Other Resources

Targeting a Specific .NET Framework Version or Profile

MinFrameworkVersion Element (Visual Studio Templates)