Compartir a través de


ToolLocationHelper.GetPathToReferenceAssemblies Method (String, String, String)

Returns the paths to the reference assemblies location for the given target framework. This method will assume the requested ReferenceAssemblyRoot path will be the ProgramFiles directory specified by Environment.SpecialFolder.ProgramFiles In additon 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.

MSBuild is now included in Visual Studio instead of the .NET Framework.You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.

Namespace:  Microsoft.Build.Utilities
Assembly:  Microsoft.Build.Utilities.Core (in Microsoft.Build.Utilities.Core.dll)

Syntax

'Declaration
Public Shared Function GetPathToReferenceAssemblies ( _
    targetFrameworkIdentifier As String, _
    targetFrameworkVersion As String, _
    targetFrameworkProfile As String _
) As IList(Of String)
public static IList<string> GetPathToReferenceAssemblies(
    string targetFrameworkIdentifier,
    string targetFrameworkVersion,
    string targetFrameworkProfile
)
public:
static IList<String^>^ GetPathToReferenceAssemblies(
    String^ targetFrameworkIdentifier, 
    String^ targetFrameworkVersion, 
    String^ targetFrameworkProfile
)
static member GetPathToReferenceAssemblies : 
        targetFrameworkIdentifier:string * 
        targetFrameworkVersion:string * 
        targetFrameworkProfile:string -> IList<string> 
public static function GetPathToReferenceAssemblies(
    targetFrameworkIdentifier : String, 
    targetFrameworkVersion : String, 
    targetFrameworkProfile : String
) : IList<String>

Parameters

  • targetFrameworkIdentifier
    Type: System.String

    Identifier being targeted

  • targetFrameworkVersion
    Type: System.String

    Version being targeted

  • targetFrameworkProfile
    Type: System.String

    Profile being targeted

Return Value

Type: IList<String>
Collection of reference assembly locations.

Exceptions

Exception Condition
ArgumentNullException

When the frameworkName is null

.NET Framework Security

See Also

Reference

ToolLocationHelper Class

GetPathToReferenceAssemblies Overload

Microsoft.Build.Utilities Namespace