Marshal.GetTypeLibVersionForAssembly(Assembly, Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the version number of a type library that will be exported from the specified assembly.
public:
static void GetTypeLibVersionForAssembly(System::Reflection::Assembly ^ inputAssembly, [Runtime::InteropServices::Out] int % majorVersion, [Runtime::InteropServices::Out] int % minorVersion);
public static void GetTypeLibVersionForAssembly (System.Reflection.Assembly inputAssembly, out int majorVersion, out int minorVersion);
[System.Security.SecurityCritical]
public static void GetTypeLibVersionForAssembly (System.Reflection.Assembly inputAssembly, out int majorVersion, out int minorVersion);
static member GetTypeLibVersionForAssembly : System.Reflection.Assembly * int * int -> unit
[<System.Security.SecurityCritical>]
static member GetTypeLibVersionForAssembly : System.Reflection.Assembly * int * int -> unit
Public Shared Sub GetTypeLibVersionForAssembly (inputAssembly As Assembly, ByRef majorVersion As Integer, ByRef minorVersion As Integer)
Parameters
- inputAssembly
- Assembly
A managed assembly.
- majorVersion
- Int32
The major version number.
- minorVersion
- Int32
The minor version number.
- Attributes
Exceptions
inputAssembly
is null
.
Remarks
Before exporting an assembly by using TypeLibExporterFlags with the CallerResolvedReferences
value, you can use this method to retrieve the type library version from the assembly.
If you do not apply the TypeLibVersionAttribute attribute to an exported assembly to explicitly control the version number of the generated type library, the type library will have the same version number as the assembly.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om