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

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17

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

MSBuild 17 i druge verzije
Proizvod Verzije
MSBuild 15, 16, 17
MSBuild (.NET Core) 15, 16, 17