web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : gTBTelY77RwEQsrM2mzUot
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Azure DevOps task PowerPlatformDeployPackage@2 exception handling

Like (0) ShareShare
ReportReport
Posted on 21 Apr 2023 13:29:38 by

I designed a CI/CD pipeline on Azure DevOps which enables a no touch deployment experience (DEV => TST => UAT => PRD). I am using  Azure DevOps task PowerPlatformDeployPackage V2, which gives me maximum control and flexibility and enables me to easily add a few custom operations targeting the Power Platform (mainly Dataverse).

 

Occasionally the deployment appears to break in this task and the logging offers very little useful details regarding the context/cause, which makes it very hard to debug. E.g. this occurs when solution import is blocked due to missing dependencies. In those cases no details are logged. Up to now my only option in these cases is to attempt a manual import of the solution and download and analyse the error log. (Am I missing something here, anyone better ideas how to tackle this in a more efficient way?)

 

Another common cause for this task to break is when an Exception is raised somewhere in my custom code. The deploy package task seems to always break whenever een exception is thrown, even when it is fully handled! (try...catch does not help here.) Again no details are logged, so trouble shooting in these scenarios turns out to be hard.

 

The logging I get in Azure DevOps looks like this:

Beginning queueing up UpdateRibbonClientMetadata job.
Microsoft PowerPlatform CLI
Version: 1.21.13+g348c5e9
 
Error: The post-import process failed: {0}
 
Usage: pac package deploy [--logFile] [--logConsole] --package [--settings] [--verbose]
 
--logFile Log file path (alias: -lf)
--logConsole Output log to console (alias: -c)
--package path to a package dll or zip file with a package (alias: -p)
--settings Runtime Package Settings that are passed to the package that is being deployed. The format of the string must be `key=value|key=value`. (alias: -s)
--verbose Emit Verbose logs to the log outputs (alias: -vdbg)
 
or this:
[ 'Microsoft PowerPlatform CLI' ]
[ 'Version: 1.21.13+g348c5e9' ]
[ '' ]
[ 'Error: \'D:\\a\\1\\CrmDeploymentArtifact\\CompanyName.Crm.PackageDeployment.dll\' - package dll or zip file name is invalid' ]
 
The package dll is valid, it is based on the most recent project template generated by the PAC CLI (using VS Code). When I attempt to execute my deployment package using the PAC CLI with the --verbose switch, I actually get a log with a stack trace of the original exception, but the steps I need to do not make me happy.
 
My questions for the community and - especially - the Microsoft Power Platform team are: am I missing something here? What is your experience regarding CI/CD pipelines for the Power Platform? (Is it really this poor?) Are there any options for getting better, more detailed error logging? Could it be an option to create my own custom ADO task and still use the Dataverse service connection?
  • Phil_Cole Profile Picture
    133 on 23 Apr 2023 at 13:45:48
    Re: Azure DevOps task PowerPlatformDeployPackage@2 exception handling

    I'm using that PPBT task.  I'm finding detailed logs are output to a pipeline artifact - these will details of the missing dependencies.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete