Share via


IVsTargetFrameworkAssemblies.GetRequiredTargetFrameworkVersionFromDependency Method

Definition

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

public:
 int GetRequiredTargetFrameworkVersionFromDependency(System::String ^ szAssemblyFile, [Runtime::InteropServices::Out] System::UInt32 % pTargetFrameworkVersion);
int GetRequiredTargetFrameworkVersionFromDependency(std::wstring const & szAssemblyFile, [Runtime::InteropServices::Out] unsigned int & pTargetFrameworkVersion);
public int GetRequiredTargetFrameworkVersionFromDependency (string szAssemblyFile, out uint pTargetFrameworkVersion);
abstract member GetRequiredTargetFrameworkVersionFromDependency : string * uint32 -> int
Public Function GetRequiredTargetFrameworkVersionFromDependency (szAssemblyFile As String, ByRef pTargetFrameworkVersion As UInteger) As Integer

Parameters

szAssemblyFile
String

[in] Path to the assembly to check.

pTargetFrameworkVersion
UInt32

[out] A WellKnownTargetFrameworkVersions value specifying the required framework version.

Returns

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  
);  

Applies to