TargetFrameworkAttribute Constructor (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes an instance of the TargetFrameworkAttribute class by specifying the .NET Framework version against which an assembly was built.

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

public TargetFrameworkAttribute(
	string frameworkName


Type: System.String

The version of the .NET Framework against which the assembly was built.

Exception Condition

frameworkName is null.

The string that is assigned to the frameworkName parameter generally takes the same form as the string that is returned by the FrameworkName.ToString method.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top