.NET Core App - How to get build number at runtime

后端 未结 3 1092
鱼传尺愫
鱼传尺愫 2021-01-12 14:39

I\'ve got a .NET Core MVC app which is built using TFS online, and published to Azure using the Release management stuff in TFS online. All very nice.

What I\'d lik

3条回答
  •  情书的邮戳
    2021-01-12 15:04

    There is an easier way than adding more plugins and libraries. If you are using the web/app deploy method, expand the File Transforms & Variables

    Assuming you want to update say a build number value in your appsettings.json

    Then just update the variables setting in your release definition of VSTS

    Super easy. This is more or less the same steps in Octopus IIRC.

提交回复
热议问题