I have setup version 2.0 of the Azure Powershell feature.
The function from Azure Data Factory (ADF) gets below exception when executing.
"errorCode": "2011",
"message": "Could not load file or assembly 'CodeGenerator, Version=1.1.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXX' or one of its dependencies. The system cannot find the file specified.",
"failureType": "UserError",
"target": "Azure Function1"
Function App Code
using namespace System.Net
# Input bindings are passed in via param block.
param($Request, $TriggerMetadata)
# Write to the Azure Functions log stream.
Write-Host "PowerShell HTTP trigger function processed a request."
# Interact with query parameters or the body of the request.
$name = $Request.Query.Name
if (-not $name) {
$name = $Request.Body.Name
}
if ($name) {
$status = [HttpStatusCode]::OK
$body = "Hello $name"
}
else {
$status = [HttpStatusCode]::BadRequest
$body = "Please pass a name on the query string or in the request body."
}
# Associate values to output bindings by calling 'Push-OutputBinding'.
Push-OutputBinding -Name Response -Value ([HttpResponseContext]@{
StatusCode = $status
Body = $body
})