Compartilhar via


IVsTargetFrameworkAssemblies.GetRequiredTargetFrameworkVersionFromDependency Method

Gets the minimum versions of the target framework required for a given assembly to run, based on the referenced assembly closure.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)

Syntax

'Declaration
Function GetRequiredTargetFrameworkVersionFromDependency ( _
    szAssemblyFile As String, _
    <OutAttribute> ByRef pTargetFrameworkVersion As UInteger _
) As Integer
int GetRequiredTargetFrameworkVersionFromDependency(
    string szAssemblyFile,
    out uint pTargetFrameworkVersion
)
int GetRequiredTargetFrameworkVersionFromDependency(
    [InAttribute] String^ szAssemblyFile, 
    [OutAttribute] unsigned int% pTargetFrameworkVersion
)
abstract GetRequiredTargetFrameworkVersionFromDependency : 
        szAssemblyFile:string * 
        pTargetFrameworkVersion:uint32 byref -> int
function GetRequiredTargetFrameworkVersionFromDependency(
    szAssemblyFile : String, 
    pTargetFrameworkVersion : uint
) : int

Parameters

  • szAssemblyFile
    Type: String

    [in] Path to the assembly to check.

Return Value

Type: Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is similar to GetRequiredTargetFrameworkVersion, but if the version can't be determined with confidence, it plus in case the version is not known with a confidence, it will attempt to discover the minimum target version from the referenced assembly closure (it will return the maximum known version).

COM Signature

From compsvcspkg90.idl:

HRESULT GetRequiredTargetFrameworkVersionFromDependency(
    [in] LPCOLESTR szAssemblyFile,
    [out] TARGETFRAMEWORKVERSION *pTargetFrameworkVersion
);

.NET Framework Security

See Also

Reference

IVsTargetFrameworkAssemblies Interface

Microsoft.VisualStudio.Shell.Interop Namespace