gpt4 book ai didi

octopus-deploy - 在 asp.net 中获取或读取使用 Octopus 部署的应用程序的版本

转载 作者:行者123 更新时间:2023-12-01 12:29:48 27 4
gpt4 key购买 nike

我正在使用 TeamCity 和 Octopus Deploy 来部署 Asp.Net 应用

我想显示部署应用程序时使用的版本号

在 teamcity 中,我使用 vcs 编号生成版本号

如何从 asp.net 读取该信息或如何保存它以供以后检索?

最佳答案

版本标记在您的库中(只要您在构建它们之前设置版本号)。

可以在运行时访问此版本号:

string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();

您也可以use the assembly version number in Octopus Deploy .这适用于 Team City、VSTS 等。这意味着 Octopus、Team City 和应用程序本身中显示的版本都将匹配,您将避免混淆。

关于octopus-deploy - 在 asp.net 中获取或读取使用 Octopus 部署的应用程序的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35374825/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com