ToolLocationHelper.GetPathToReferenceAssemblies Method

Definition

Gets the paths to the reference assemblies location for the given target framework.

Overloads

GetPathToReferenceAssemblies(FrameworkName)

Gets the paths to the reference assemblies location for the given target framework.

GetPathToReferenceAssemblies(String, FrameworkName)

Gets the paths to the reference assemblies location for the given framework version relative to a given targetFrameworkRoot.

GetPathToReferenceAssemblies(String, String, String)

Returns the paths to the reference assemblies location for the given target framework. This method assumes the requested ReferenceAssemblyRoot path is the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles. In addition, when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths for the legacy .NET Framework versions. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.

GetPathToReferenceAssemblies(FrameworkName)

Gets the paths to the reference assemblies location for the given target framework.

public:
 static System::Collections::Generic::IList<System::String ^> ^ GetPathToReferenceAssemblies(System::Runtime::Versioning::FrameworkName ^ frameworkName);
public static System.Collections.Generic.IList<string> GetPathToReferenceAssemblies (System.Runtime.Versioning.FrameworkName frameworkName);
static member GetPathToReferenceAssemblies : System.Runtime.Versioning.FrameworkName -> System.Collections.Generic.IList<string>

Parameters

frameworkName
FrameworkName

The framework name.

Returns

The paths to the reference assemblies location.

Exceptions

When the frameworkName is null

Remarks

This method assumes that the requested ReferenceAssemblyRoot path will be the ProgramFiles directory that is specified by Environment.SpecialFolder.ProgramFiles. In addition, when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5, or 4, the correctly chained reference assembly paths for the legacy .NET Framework versions will be returned. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.

GetPathToReferenceAssemblies(String, FrameworkName)

Gets the paths to the reference assemblies location for the given framework version relative to a given targetFrameworkRoot.

public:
 static System::Collections::Generic::IList<System::String ^> ^ GetPathToReferenceAssemblies(System::String ^ targetFrameworkRootPath, System::Runtime::Versioning::FrameworkName ^ frameworkName);
public static System.Collections.Generic.IList<string> GetPathToReferenceAssemblies (string targetFrameworkRootPath, System.Runtime.Versioning.FrameworkName frameworkName);
static member GetPathToReferenceAssemblies : string * System.Runtime.Versioning.FrameworkName -> System.Collections.Generic.IList<string>

Parameters

targetFrameworkRootPath
String

The root directory used to calculate the reference assembly path. The reference assemblies will be generated in the following way: TargetFrameworkRootPath\TargetFrameworkIdentifier\TargetFrameworkVersion\SubType\TargetFrameworkSubType.

frameworkName
FrameworkName

A frameworkName class which represents a TargetFrameworkMoniker. This cannot be null.

Returns

The paths to the reference assemblies location.

Remarks

This method does not check to see if the path exists or not.

GetPathToReferenceAssemblies(String, String, String)

Returns the paths to the reference assemblies location for the given target framework. This method assumes the requested ReferenceAssemblyRoot path is the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles. In addition, when the .NETFramework or .NET Framework targetFrameworkIdentifiers are seen and targetFrameworkVersion is 2.0, 3.0, 3.5 or 4.0 we will return the correctly chained reference assembly paths for the legacy .NET Framework versions. This chaining will use the existing GetPathToDotNetFrameworkReferenceAssemblies to build up the list of reference assembly paths.

public:
 static System::Collections::Generic::IList<System::String ^> ^ GetPathToReferenceAssemblies(System::String ^ targetFrameworkIdentifier, System::String ^ targetFrameworkVersion, System::String ^ targetFrameworkProfile);
public static System.Collections.Generic.IList<string> GetPathToReferenceAssemblies (string targetFrameworkIdentifier, string targetFrameworkVersion, string targetFrameworkProfile);
static member GetPathToReferenceAssemblies : string * string * string -> System.Collections.Generic.IList<string>
Public Shared Function GetPathToReferenceAssemblies (targetFrameworkIdentifier As String, targetFrameworkVersion As String, targetFrameworkProfile As String) As IList(Of String)

Parameters

targetFrameworkIdentifier
String

Identifier being targeted

targetFrameworkVersion
String

Version being targeted

targetFrameworkProfile
String

Profile being targeted

Returns

Collection of reference assembly locations.

Exceptions

When the frameworkName is null

Applies to