Skip to content

Error after using 0.6.1 - Exception: Assert: Task Export-LogicApp.AzCli does not exist. #52

@Ruprect

Description

@Ruprect

After re-installing my computer, I was unable to run my script to export Logic Apps.

When running my powershell and runbook (see below) I get the following error:

Exception: Error: 29/06/2023 12.56.37:  At ...\PowerShell\Modules\psake\4.9.0\public\Assert.ps1:69 char:9 +
   throw ('Assert: {0}' -f$failureMessage) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [<<==>>] 
    Exception: Assert: Task Export-LogicApp.AzCli does not exist.

But by uninstalling 0.6.1 and installing version 0.5.15 the error is fixed:

UnInstall-Module -Name PsLogicAppExtractor
Install-Module -Name PsLogicAppExtractor -RequiredVersion 0.5.15
My powershell script

Invoke-PsLaExtractor -Runbook $runbookpath `
   -SubscriptionId $SubscriptionId `
   -ResourceGroup $ResourceGroup `
   -Name "$LogicAppName" `
   -OutputPath "$RootPath/Logic Apps/"

My runbook

# Object to store the needed parameters for when running the export
Properties {
    $SubscriptionId = ""
    $ResourceGroup = ""
    $Name = ""
    $ApiVersion = "2019-05-01"
}

# Used to import the needed classes into the powershell session, to help with the export of the Logic App
."$(Get-PSFConfigValue -FullName PsLogicAppExtractor.ModulePath.Classes)\PsLogicAppExtractor.class.ps1"

# Path variable for all the tasks that is available from the PsLogicAppExtractor module
$pathTasks = $(Get-PSFConfigValue -FullName PsLogicAppExtractor.ModulePath.Tasks)

# Include all the tasks that is available from the PsLogicAppExtractor module
Include "$pathTasks\All\All.task.ps1"

# Array to hold all tasks for the default task
$listTasks = @()
    
# Building the list of tasks for the default task

#Pick ONE of these two
$listTasks += "Export-LogicApp.AzCli"
#$listTasks += "Export-LogicApp.AzAccount"

$listTasks += "ConvertTo-Raw"
$listTasks += "Set-Raw.ApiVersion"
$listTasks += "ConvertTo-Arm"
$listTasks += "Set-Arm.Connections.ManagedApis.IdFormatted"
$listTasks += "Set-Arm.Connections.ManagedApis.AsParameter"
$listTasks += "Set-Arm.LogicApp.Name.AsParameter"
$listTasks += "Set-Arm.LogicApp.Parm.AsParameter"
    
# Default tasks, the via the dependencies will run all tasks
Task -Name "default" -Depends $listTasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions