How to fix Azure Message Queue Trigger Function App Not Running the "Run" Method
I am having trouble with setting my Azure Message Queue Trigger Function App so that it deploys and runs without error. I had it reading the queue but not running the "Run" Method at one point. At that time, I could run it using the Test/Run option in Azure without error. I do have it converted to isolated worker model with those latest references. Included code below
Un-called method...
[Function(nameof(FunctionMapData))]
public static void Run([QueueTrigger("maptaskqueue", Connection = "StorageConnectionString")] QueueMessage myQueueItem, FunctionContext context)
local.settings.json...
{
"IsEncrypted": false,
"Values": {
"LOCALOnePortalSQLDatabaseConnection": "",
"OnePortalSQLDatabaseConnection": "",
"LOCALStorageConnectionString": "",
"StorageConnectionString": "",
"LOCALAzureWebJobsStorage": "",
"AzureWebJobsStorage": "",
"emailUserName": "",
"emailPassword": "",
"emailHost": "",
"emailPort": "",
"emailSubject": "",
"emailContent": "",
"emailErrorSubject": "",
"emailErrorContent": "",
"functionTimeout": "00:60:00",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated"
}
}
Project...
<PropertyGroup Label="Globals">
<SccProjectName>SAK</SccProjectName>
<SccProvider>SAK</SccProvider>
<SccAuxPath>SAK</SccAuxPath>
<SccLocalPath>SAK</SccLocalPath>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.2" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.24.1" />
<PackageReference Include="ExcelDataReader" Version="3.7.0" />
<PackageReference Include="Azure.Data.Tables" Version="12.10.0" />
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.22.0" />
<PackageReference Include="Azure.Storage.Queues" Version="12.22.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.23.0" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.52.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="2.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.ServiceBus" Version="5.22.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues" Version="5.5.2" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.5" OutputItemType="Analyzer" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.12.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.6" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.6" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="9.0.6" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>