次の方法で共有


IVsTargetFrameworkAssemblies.GetRequiredTargetFrameworkVersion Method

Definition

Gets the minimum versions of the target framework required for the given assembly to run.

public:
 int GetRequiredTargetFrameworkVersion(System::String ^ szAssemblyFile, [Runtime::InteropServices::Out] System::UInt32 % pTargetFrameworkVersion);
int GetRequiredTargetFrameworkVersion(std::wstring const & szAssemblyFile, [Runtime::InteropServices::Out] unsigned int & pTargetFrameworkVersion);
public int GetRequiredTargetFrameworkVersion (string szAssemblyFile, out uint pTargetFrameworkVersion);
abstract member GetRequiredTargetFrameworkVersion : string * uint32 -> int
Public Function GetRequiredTargetFrameworkVersion (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 will return a framework version only if it can be determined with a given assembly, otherwise it will return TargetFrameworkVersion_Unknown.

COM Signature

From compsvcspkg90.idl:

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

Applies to