mscorlib 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)

The class provides an attribute that you can apply to an assembly to indicate the version of the .NET Framework runtime against which the assembly was built. For example, the following example applies the TargetFrameworkAttribute to an assembly to indicate that it was built using net_v40_long.

code reference: System.Runtime.Versioning.TargetFrameworkAttribute#1

The class constructor has a single parameter, , that specifies the .NET Framework version against which the assembly was built. This parameter maps to the property. In addition, the attribute can specify a property to provide a more descriptive .NET Framework version string that is suitable for displaying to clients of the assembly. The following example applies the TargetFrameworkAttribute to an assembly and assigns both property values to indicate that the assembly was built using net_v40_long.

code reference: System.Runtime.Versioning.TargetFrameworkAttribute#2

Identifies the version of the .NET Framework that a particular assembly was compiled against.

- Constructor
  4.0.0.0

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

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

  The version of the .NET Framework against which the assembly was built.
- Property
  4.0.0.0
  System.String To be added.

  The property usually returns a relatively long descriptive string that is suitable for display to a user.

  Gets the display name of the .NET Framework version against which an assembly was built.

- Property
  4.0.0.0
  System.String To be added.

  The property maps to the parameter of the constructor. It represents the .NET Framework version in a compact form and typically corresponds to the string that is returned by the method.

  Gets the name of the .NET Framework version against which a particular assembly was compiled.