Freigeben über


VCProject.Version Method

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

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Syntax

'Declaration
Sub Version ( _
    <OutAttribute> ByRef major As Integer, _
    <OutAttribute> ByRef minor As Integer _
)
void Version(
    out int major,
    out int minor
)
void Version(
    [OutAttribute] int% major, 
    [OutAttribute] int% minor
)
abstract Version : 
        major:int byref * 
        minor:int byref -> unit
function Version(
    major : int, 
    minor : int
)

Parameters

  • major
    Type: System.Int32%

    An integer representing the major version of the project.

  • minor
    Type: System.Int32%

    An integer representing the minor version of the project.

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

.NET Framework Security

See Also

Reference

VCProject Interface

Microsoft.VisualStudio.VCProjectEngine Namespace