1. AIP setup project configured to use an Artifact Signing certificate in "Digital Signatures" page
2. a build script using our PowerShell Automation support that calls Build() or Rebuild() command to run a setup project build
3. the Azure login token (requested to access your Artifact Signing certificate) is stored in per-user environment variables of a specific Windows user account on your build machine
4. the build script is launched by a service running under the above Windows user account owning the environemnt variables which stores the Azure login token
Result: the build script hangs during the call of setup project Build() or Rebuild() command
Solution: You should set the "LoadUserSettings" REG_DWORD registry to value 1 on your build machine under the following registry key path:
Code: Select all
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\{CBC3FF2A-05C4-41CE-953E-0B5E209233A0}The above scenario can be encountered for instance when you have an Azure DevOps pipeline build configured to run under a user agent self-hosted on a local machine from your network. The self-hosted build agent runs as a Windows service under a specific user account and the Azure login token is stored in per-user environment variables belonging to the service user account.
If pipeline build runs a PowerShell build script that calls our Build() command to execute the setup project build, you may observe that the setup project build hangs.
This happens because our Powershell Automation support is a COM module implementation. And a COM module, when executed in a non-interactive context (e.g. from a Windows service), may not load the full user profile unless the "LoadUserSettings" flag si not set for the related COM component.
All the best,
Daniel
FOLLOW US
Get the latest news in Application Packaging