Hi @Dirth, Steven ,
I tried to repro this locally but was not able to get the exact error. However, here are some of the action plans that should help you with the issue.
- In my test repro, I can see
worker.config.json
available in the ..\bin[Release|Debug]\net5.0 folder. Do you have this file in this location as well? What is the content of this file? - Do you see the same issue with a newly created .NET 5 isolated function app?
Additionally, you may try the following for this issue:
a. Please ensure that the following packages are referenced in the .csproj file:
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.0.4" OutputItemType="Analyzer" />
b. To rule out local nuget cache corruption, clean the local Nuget cache using the steps here. worker.config.json is part of Microsoft.Azure.Functions.Worker.Sdk nuget package. This step should help rectify any corruption due to unexpected edits of this file in the cache.
c. Delete the bin and obj folder from the solution directory.
d. Build and run to see if you are still facing this issue.
----------
Issues related to migration to .NET 5 are also being discussed here on Github.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.