Visual studio 团队服务 - 代理更新到版本 2 后八达通不工作

Visual studio team services - Octopus does not work after agent update to version 2

背景:

我们正在使用 VSTS 构建和 Octopus 集成来部署我们的产品。 Octopus步骤配置如下,

问题

今天 VSTS Build 抛出以下错误,

No supported agent found in pool Default. All agents in this pool are using a version that is deprecated. Migrate to the latest 2.x version of agent. For more information, see https://go.microsoft.com/fwlink/?linkid=851067

结果,Agent更新到最新版本, 更新后章鱼步骤停止工作并出现以下错误,

那么问题似乎是步骤中没有替换环境变量。

我想知道是否有解决此问题的方法。

首先,有2.*版本可用,所以你可以删除旧版本并添加新版本。

其次,在 Package Version 输入框中使用 $(Build.BuildNumber),输出路径也是如此:$(Build.ArtifactStagingDirectory).