如何显示在VS.NET部署项目的应用程序版本? [英] How to show application version in VS.NET Deployment Project?

查看:214
本文介绍了如何显示在VS.NET部署项目的应用程序版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已成立了一个项目部署我的应用程序。问题是,我想在安装过程中显示应用程序的版本(如所有MyApplication 1.2.3.1),使用户可以在安装之前看到的版本。

I have set up a Deployment Project for my application. The problem is that I want to show application version (eg. MyApplication 1.2.3.1) during installation so the user can see the version before installing.

我能想到的唯一的办法是修改WelcomeText在欢迎对话框。是否有一个更容易或更优雅的方式来实现这一目标?

The only way I can think of is to modify the WelcomeText in Welcome dialog. Is there an easier or more elegant way to achieve this?

推荐答案

您应该能够使用Windows Installer的ProductVersion属性用于此。如果您在欢迎对话框的WelcomeText属性更改为:

You should be able to use the Windows Installer ProductVersion property for this. If you change the Welcome dialog's WelcomeText property to:

The installer will guide you through the steps required to install [ProductName] [ProductVersion] on your computer.



然后就可以改变部署项目的Version属性,具有值自动显示。任何基于字符串的属性可以做到这一点; 。只需使用[]语法有值插入

Then you can change the Deployment Project's Version property and have the value automatically displayed. Any string-based property can do this; just use the [] syntax to have the value inserted.

有关提供开箱即用的其他属性,看的 Windows安装程序属性参考

For other properties that are provided out of the box, see the Windows Installer Property Reference

这篇关于如何显示在VS.NET部署项目的应用程序版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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