I had this error occur when building an Azure Function (with a queue trigger, should it make a difference)
The issue in this case was because the AzureFunctionsVersion
was set to v2 instead of v3. To update it via VS2019, unload the project then edit the csproj file. Within the PropertyGroup
node, add/edit the following:
<PropertyGroup>
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
</PropertyGroup>