在.NET Compact Framework的应用程序版本号 [英] Version number in .NET Compact Framework application

查看:290
本文介绍了在.NET Compact Framework的应用程序版本号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在屏幕上显示的.NET Compact Framework的版本号。我使用.NET CF 2.0与Windows  CE 4.0

I need to display the .NET Compact Framework version number on the screen. I am using .NET CF 2.0 with Windows CE 4.0.

到目前为止,我已经完全忽略了版本号。我是否需要添加任何大会?我该如何找回它编程?

So far, I have been ignoring the version number completely. Do I need to add anything to the assembly? how do I retrieve it programmatically?

不幸的是,这并不适用的 Compact Framework的的。该 Application.ProductVersion 属性不Compact Framework的存在。你的答案的最新部分适用,但。

Unfortunately this does not apply to Compact Framework. The Application.ProductVersion property doesn't exist in Compact Framework. The latest part of your answer applies though.

还有一个问题: 做这些特性(主要,次要,建立,修订版)获得自动增加或对它们进行设置,每当我想?我看到它的方式,修改应自动递增每个新版本。

One more question: do these properties (major, minor, build, revision) get incremented automatically or do I set them whenever I want to? The way I see it, the revision should be automatically incremented with each new build.

推荐答案

System.Reflection.Assembly.GetExecutingAssembly()的GetName()。Version.Major System.Reflection.Assembly.GetExecutingAssembly()的GetName()。Version.Minor System.Reflection.Assembly.GetExecutingAssembly()的GetName()。Version.Build System.Reflection.Assembly.GetExecutingAssembly()的GetName()。Version.Revision

System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Major System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Minor System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Build System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.Revision

来源:<一href="http://msdn.microsoft.com/en-us/library/system.version.aspx">http://msdn.microsoft.com/en-us/library/system.version.aspx

(编辑)

Application.ProductVersion地产

Application.ProductVersion Property

获取与此应用程序关联的产品版本。

Gets the product version associated with this application.

不具备的紧凑型框架,但System.Reflection.Assembly.GetExecutingAssembly()的GetName()版本。

Not Available In Compact Framework But System.Reflection.Assembly.GetExecutingAssembly().GetName().Version Is.

来源:<一href="http://msdn.microsoft.com/en-us/library/system.windows.forms.application.productversion.aspx">http://msdn.microsoft.com/en-us/library/system.windows.forms.application.productversion.aspx

这篇关于在.NET Compact Framework的应用程序版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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