ToolLocationHelper.GetPathToDotNetFramework Method

Definition

Gets a fully qualified path to the .NET Framework root directory.

Overloads

GetPathToDotNetFramework(TargetDotNetFrameworkVersion)

Get a fully qualified path to the frameworks root directory.

GetPathToDotNetFramework(TargetDotNetFrameworkVersion, DotNetFrameworkArchitecture)

Get a fully qualified path to the framework's root directory.

GetPathToDotNetFramework(TargetDotNetFrameworkVersion)

Source:
ToolLocationHelper.cs

Get a fully qualified path to the frameworks root directory.

C#
public static string GetPathToDotNetFramework(Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version);
C#
[System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
public static string GetPathToDotNetFramework(Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version);

Parameters

version
TargetDotNetFrameworkVersion

Version of the targeted .NET Framework

Returns

Will return 'null' if there is no target frameworks on this machine.

Attributes

Applies to

.NET Framework 4.8.1 ve diğer sürümler
Ürün Sürümler
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

GetPathToDotNetFramework(TargetDotNetFrameworkVersion, DotNetFrameworkArchitecture)

Source:
ToolLocationHelper.cs

Get a fully qualified path to the framework's root directory.

C#
public static string GetPathToDotNetFramework(Microsoft.Build.Utilities.TargetDotNetFrameworkVersion version, Microsoft.Build.Utilities.DotNetFrameworkArchitecture architecture);

Parameters

version
TargetDotNetFrameworkVersion

Version of the targeted .NET Framework

architecture
DotNetFrameworkArchitecture

Desired architecture, or DotNetFrameworkArchitecture.Current for the architecture this process is currently running under.

Returns

Applies to

.NET Framework 4.8.1 ve diğer sürümler
Ürün Sürümler
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1