AssemblyInfo.Version Property

Definition

Gets the version number of the application.

public:
 property Version ^ Version { Version ^ get(); };
public Version Version { get; }
member this.Version : Version
Public ReadOnly Property Version As Version

Property Value

A Version object containing the version number of the application.

Exceptions

The application does not have sufficient permissions to access the assembly version.

Examples

This example uses the My.Application.Info.Version property to display the version of the application.

MsgBox("Application version: " & My.Application.Info.Version.ToString)

Remarks

The My.Application.Info.Version property gets a Version object containing the version number of the application. You can use the Major, Minor, Build, and Revision properties of the Version object to access specific version information about the application.

ClickOnce-deployed applications should use the CurrentVersion property of the Deployment property.

Availability by Project Type

Project type Available
Windows Forms Application Yes
Class Library Yes
Console Application Yes
Windows Forms Control Library Yes
Web Control Library No
Windows Service Yes
Web Site No

Applies to

See also