This documentation is archived and is not being maintained.

FrameworkName Constructor (String)

Initializes a new instance of the FrameworkName class from a string that contains information about a version of the .NET Framework.

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

public FrameworkName(
	string frameworkName


Type: System.String
A string that contains .NET Framework version information.


frameworkName is String.Empty.


frameworkName has fewer than two components or more than three components.


frameworkName does not include a major and minor version number.


frameworkName does not include a valid version number.


frameworkName is null.

The FrameworkName(String) constructor parses a string in the following format.

identifier, Version=versionNumber[, Profile=profileName]

Components in square brackets are optional. The following table describes each component.




An arbitrary string that identifies this FrameworkName instance.


A string that represents the version of the .NET Framework, in the form [v]major.minor[.build.revision], where "v" can be either uppercase or lowercase, and the brackets denote optional elements of a version number.


An arbitrary string that represents the profile of the .NET Framework version. Typically, it is used to denote some subset of the .NET Framework, such as the .NET Compact Framework or Silverlight.

If both versionNumber and profileName are present, they can appear in any order after identifier. These strings are defined by the "Version" and "Profile" keywords, which are not case-sensitive.

The values of the identifier, versionNumber, and profileName components define the values of this FrameworkName object's properties as follows:

  • Any leading or trailing white space in the identifier component is removed and the resulting string is assigned to the Identifier property.

  • Any leading or trailing white space and the initial "v" or "V", if present, are removed from the versionNumber. The returned string is then passed to the Version.Version(String) constructor, and the resulting System.Version object is assigned to the Version property.

  • Any leading or trailing white space in the profileName component is removed and the resulting string is assigned to the Profile property.

The following are examples of valid strings that can be passed to the FrameworkName constructor:

  • .NET Framework, Version=4.0

  • .NETFramework, Version=4.0

  • .NET Framework, Version=2.0, Profile=Compact

  • .NET Framework, Version=v4.0, Profile=Compact

  • .NET Framework, Profile=Full, Version=2.0.0

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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