如何在VB.NET程序中获取当前的发布版本? [英] How to get the current publish version in VB.NET program?
本文介绍了如何在VB.NET程序中获取当前的发布版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的程序中,每次发布时发布版本都会正确递增。
但是当我用来检索那个发布版本值时,它总是给1.0.0.0
所以如何获得这个递增的发布版本?
我尝试过的方法:
In my program publish version is properly incrementing each time i published.
But when i use to retrieve that publish version value it is giving 1.0.0.0 always
So how to get this incremented publish version??
What I have tried:
If System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed Then
Dim ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment
s1 = ad.CurrentVersion.ToString()
Dim name As String = "Registry Updater" + s1 //always it is giving 1.0.0.0 in name i,e assembly version.
End If
推荐答案
Application.ProductVersion
lol ......就这么简单......
lol... It is that simple...
这篇关于如何在VB.NET程序中获取当前的发布版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文