2
votes

I have an error saying

Error: The function runtime is unable to start. mscorlib: Could not load file or assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Do I need to setup anything in the azure portal? I can run it on my local machine. After I published the function to azure and tried to run the function it gave me this error.

3
I'm assuming you are using Functions V2. Does your function application use any extensions?Connor McMahon
I solved by remove the existing function in azure portal and recreate from my visual studio project. But, even though the Function is running in the portal but the queue is not firing the Function.LittleFunny
If it is solved, you could add an answer. If you still have other issue, you create a new SO thread.Tom Sun - MSFT

3 Answers

1
votes

I ran into this same issue locally and solved it by clearing my local nuget cache. See How to clear NuGet package cache using command line?

1
votes

If you are running Functions V2 you need to ensure that the Function App's "FUNCTIONS_EXTENSION_VERSION" Application Setting on Azure is set to a value of "~2". It seems to default to "~1" - you can modify the value manually or through your automated release process (CD).

HTH

0
votes

I removed the azure function created previously and create a new one from Visual Studio by creating a azure function project and publish from there.