【发布时间】:2014-09-26 08:57:13
【问题描述】:
我们使用 Octopus Deploy 来部署我们的应用程序。如果我的 WinForm 应用程序可以在运行时显示 Octopus Deploy 版本号,那将非常有用。
是否可以设置 Octopus Deploy 以便将存储在 app.config 中的变量设置为 Octopus.Release.Number 系统变量,以便我可以在运行时检索版本号?
【问题讨论】:
标签: c# winforms octopus-deploy
我们使用 Octopus Deploy 来部署我们的应用程序。如果我的 WinForm 应用程序可以在运行时显示 Octopus Deploy 版本号,那将非常有用。
是否可以设置 Octopus Deploy 以便将存储在 app.config 中的变量设置为 Octopus.Release.Number 系统变量,以便我可以在运行时检索版本号?
【问题讨论】:
标签: c# winforms octopus-deploy
根据Variable substitution in files with Octopus 2.3和System Variables可以:
<add key="OctopusReleaseNumber"value="#{Octopus.Release.Number}" />
然后你可以从代码中读取替换的值。
【讨论】: