Прочетете на английски Редактиране

Споделяне чрез


AppContext.TargetFrameworkName Property

Definition

Gets the name of the framework version targeted by the current application.

C#
public static string? TargetFrameworkName { get; }
C#
public static string TargetFrameworkName { get; }

Property Value

The name of the framework version targeted by the current application.

Remarks

The name of the target framework version corresponds to the value of the TargetFrameworkAttribute.FrameworkName property. For a list of target framework names for .NET Framework, see the <supportedRuntime> Element element.

Applies to

Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.6, 2.0, 2.1

See also