@Marshall Desouza (US) Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
I understand that you are encountering the error ystem.Private.CoreLib: Could not load type 'Microsoft.Azure.WebJobs.Host.SupportsRetryAttribute' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.31.0
while running your Azure Function App on VS 2022.
It seems that the error is related to the Azure Functions runtime and the version of the Microsoft.Azure.WebJobs.Host assembly.
Please follow the below action plan and check if that helps:
- To resolve this issue, we recommend checking the version of the
Microsoft.Azure.WebJobs.Host
assembly that you are using. The error message indicates that the assembly version is '3.0.31.0'. This version may not be compatible with the Azure Functions runtime that you are using. - Please run the command
func --version
and check the Function core runtime version. Ensure that you are using an updated and most recent version (4.0.5198).
Please uninstall and reinstall the most recent Function core tools
https://github.com/Azure/azure-functions-core-tools#installing
- We suggest updating the
Microsoft.Azure.WebJobs
assembly to a most recent version that is compatible with your Azure Functions runtime. You can find the latest version of the assembly in the NuGet package manager in Visual Studio. Also the most recent version for this is 3.0.37 (see here) - Additionally, you can try cleaning and rebuilding your project to ensure that all dependencies are up to date and correctly referenced.
- Check if any incorrect versions (or older versions) references are added within your .csproj file.
If the issue persists, you can try creating a new Azure Functions project and copying your code into the new project. This can help ensure that all dependencies are correctly set up.
Sharing some articles where similar issue was reported:
https://stackoverflow.com/questions/70800974/could-not-load-type-microsoft-azure-webjobs-host-scale-concurrencymanager-from
https://github.com/Azure/azure-functions-dotnet-extensions/issues/54
Hope this helps.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.