[error]Error packaging project: Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1

How to troubleshoot "[error]Error packaging project: Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1" error

Issue description:

Error: "[error]Error packaging project: Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1"

Causes:

  1. Using legacy CLI with Windows Project.
  2. An incorrect secret value is defined in the Service Connection.
  3. Incorrect Scopes defined in the Service Connection.

Resolutions:

  1. Updated to the latest version of UiPath CLI/Azure DevOps Extension .
  2. Regenerated a new secret in the External App Registration in Orchestrator and added to Service Connection
  3. Added Scopes from Documentation