Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

About EXE version, again! 1

Status
Not open for further replies.

IlyaRabyy

Programmer
Nov 9, 2010
571
US
Colleagues,
This is 3rd time I'm posting this question because I haven't gotten any response to my previous two posts here. So, here I go again:
Code:
Code:
====================================================================================================================================
Private Sub frmASCII_Text_Search_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'====================================================================================================================================
' Purpose       : Initializes Form and its components.
' Description   : Initializes Search in Dir entry box with Program's Start Dir;
'						Fills out the File Types ListBox;
' Side effects  : Shan't be any.
' Notes         : 1. Application-specific.
'                 2. Complies with .NET Framework ver. 1.1 and higher.
' Author        : Ilya I. Rabyy
' Revisions     : by Ilya on 2022-01-25 – started 1st draft.
'						by Ilya on 2022-02-17 – completed 1st draft, EXE was compiled.
'						by Ilya on 2024-04-27 to display the EXE version on the Form's title bar.
'====================================================================================================================================
txtSrcDir.Text = gsStartDir

Dim lnExtCnt As Int16 = gaFileTypes.Length() - 1

For iPtr As Int16 = 0 To lnExtCnt
	Me.lstExtensions.Items.Add(gaFileTypes(iPtr))
Next

Me.txtSrcDir.Text = gsLastSrcDir
'************************************************************************************************************************************
'******************* Next code was added by Ilya on 2024-04-27 to display the EXE version on the Form's title bar *******************
'************************************************************************************************************************************
Me.Text = Me.Text & " ver. " & Application.ProductVersion
'************************************************************************************************************************************
'******************** End of code added by Ilya on 2024-04-27 to display the EXE version on the Form's title bar ********************
'************************************************************************************************************************************

End Sub
'====================================================================================================================================

Here's the application's publishing page (version part):

20220427_VS2019_EXE_Version_Control_cfpmit.jpg


I, then, run the Publisher - which created setup kit, ran Setup.EXE, launched app's EXE and...
... same version1.0.0.0!

20220427_VS2019_EXE_Version_AfterSetup_ynyakx.jpg


What am I missing or doing wrong?
Please advise!


Regards,

Ilya
 
It is because Application.ProductVersion does not return the Publish version.

Try

Code:
Imports System.Deployment.Application

If ApplicationDeployment.IsNetworkDeployed Then
   Me.Text= ApplicationDeployment.CurrentDeployment.CurrentVersion
Else
   me.Text = Application.ProductVersion
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top