Share via


VCProject.Version(Int32, Int32) Method

Definition

Sets or returns the major and minor version numbers of the project.

public:
 void Version([Runtime::InteropServices::Out] int % major, [Runtime::InteropServices::Out] int % minor);
void Version([Runtime::InteropServices::Out] int & major, [Runtime::InteropServices::Out] int & minor);
[System.Runtime.InteropServices.DispId(854)]
public void Version (out int major, out int minor);
[<System.Runtime.InteropServices.DispId(854)>]
abstract member Version : int * int -> unit
Public Sub Version (ByRef major As Integer, ByRef minor As Integer)

Parameters

major
Int32

An integer representing the major version of the project.

minor
Int32

An integer representing the minor version of the project.

Attributes

Examples

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

' Add a reference to Microsoft.VisualStudio.VCProjectEngine before   
' running this example.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim sln As Solution  
        Dim prj As VCProject  
        prj = DTE.Solution.Item(1).Object  
        prj.Version("4", "5")  
    End Sub  
End Module  

Applies to