显示版本号 [英] Displaying Version Number

查看:129
本文介绍了显示版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用此代码来显示版本号,这已经好了,但是我现在正在使用ClickOnce发布更改为

安装项目,这不再有效。


如果System.Diagnostics.Debugger.IsAttached = False那么

Version.Text =" Version:" &

My.Application.Deployment.CurrentVersion.ToString()

Else

Version.Text =" Debug Mode"

结束如果


有什么建议吗?


TIA

Phil

解决方案

参见例如My.Application.Info.Version.ToString


-

Patrice

" Phil" < N /Aéécritdansle message de groupe de discussion:
瓦特 - ********* @ posted.plus net ...


我一直在使用这段代码来显示版本号,而这已经好了,但是b $ b工作得很好,但是我现在正在使用ClickOnce发布改为

a

正确的安装项目,这不再有效。


如果系统.Diagnostics.Debugger.IsAttached = False然后

Version.Text =" Version:" &

My.Application.Deployment.CurrentVersion.ToString()

Else

Version.Text =" Debug Mode"

结束如果


有什么建议吗?


TIA

Phil


参见例如My.Application.Info.Version.ToString


只提供不是单个程序集的版本相同的

的事情。


我的理解是你不再使用clickonce所以AFAIK你不能

具有部署版本,如果这是您所追求的。 (你有一个

错误,因为部署什么都没有。你也可以使用

IsNetworkDeployed属性来查看安装后是否点击这个。)


附注.NET 3.5 SP1(目前作为测试版)似乎为ClickOnce部署引入了新的

功能但是如果你不再使用ClickOnce

你将不得不使用你的应用程序的版本(你也可以通过

手中的assemblyinfo文件来控制它。)


-

Patrice


" Phil" < N /Aéécritdansle message de groupe de discussion:
3C ********* @ posted.plus net ...


>参见例如My.Application.Info.Version.ToString


只提供单个组件的版本,而不是

相同的东西。


I have been using this code to display the version number, and this has
worked well, but I am now changing from using the ClickOnce publishing to a
proper setup project, and this no longer works.

If System.Diagnostics.Debugger.IsAttached = False Then
Version.Text = "Version : " &
My.Application.Deployment.CurrentVersion.ToString( )
Else
Version.Text = "Debug Mode"
End If

Any suggestions?

TIA
Phil

See for example My.Application.Info.Version.ToString

--
Patrice
"Phil" <N/Aa écrit dans le message de groupe de discussion :
w-******************************@posted.plusnet...

I have been using this code to display the version number, and this has
worked well, but I am now changing from using the ClickOnce publishing to
a
proper setup project, and this no longer works.

If System.Diagnostics.Debugger.IsAttached = False Then
Version.Text = "Version : " &
My.Application.Deployment.CurrentVersion.ToString( )
Else
Version.Text = "Debug Mode"
End If

Any suggestions?

TIA
Phil


See for example My.Application.Info.Version.ToString

That only gives the version of the individual assembly which is not the same
thing.


My understanding is that you don''t use anymore clickonce so AFAIK you can''t
have the deployment version if this is what you are after. (do you have an
error because deployment is nothing. You could also use the
IsNetworkDeployed property to see if this is click once installation).

A a side note .NET 3.5 SP1 (currently as a beta) seems to introduce new
capabilities for ClickOnce deployment but if you don''t use ClickOnce anymore
you''ll have to use the version of your app (you can also control this by
hand in an assemblyinfo file).

--
Patrice

"Phil" <N/Aa écrit dans le message de groupe de discussion :
3c******************************@posted.plusnet...

>See for example My.Application.Info.Version.ToString


That only gives the version of the individual assembly which is not the
same thing.


这篇关于显示版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆