Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Version Method (VCProject Object)

Visual Studio .NET 2003

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

[Visual Basic.NET]
Public Function Version( _
   ByVal major As Integer, _
   ByVal minor As Integer _
) 
[Visual Basic 6]
Function Version( _
   ByVal major As Long, _
   ByVal minor As Long _
) 
[C++]
HRESULT __stdcall Version(
   long* major,
   long* minor,
   /* [out, retval] */ * retVal
);
[C#]
public  Version(
   int major,
   int minor
);
[JScript.NET]
public function Version(
   major : int,
   minor : int
) : 

Parameters

major
An integer representing the major version of the project.
minor
An integer representing the minor version of the project.

Return Value

Returns an integer representing the major and minor versions of the project.

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

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCProject Object

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.