我设法通过将我的 powershell 脚本移动到一个文件并从
.targets
<Exec Command="pwsh -File update-settings.ps1 $(AppSettingsFilePath) $(VersionMatch) $(VersionSuffixMatch)" />
现在也可以在
docker build