Export (0) Print
Expand All

AppDomainSetup.TargetFrameworkName Property

.NET Framework 4.5

Gets or sets a string that specifies the target version and profile of the .NET Framework for the application domain, in a format that can be parsed by the FrameworkName.FrameworkName(String) constructor.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public string TargetFrameworkName { get; set; }

Property Value

Type: System.String
The target version and profile of the .NET Framework.

Set this property to tell the currently running version of the .NET Framework that the application domain will be used to load and run assemblies that have been compiled for the target version and profile. If the currently running version of the .NET Framework has optional behaviors that affect the compatibility of code that was compiled with the target version, it can enable or disable those behaviors, as appropriate, to improve compatibility. This can be useful when an application supports add-ins compiled with multiple versions of the .NET Framework by running them in separate application domains.

For client applications, the value of the TargetFrameworkName property is inferred from the TargetFrameworkAttribute attribute. In Visual Studio 2010 and later, this attribute is added to the assembly automatically based on the setting of the project's Target Framework property.

.NET Framework

Supported in: 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft