2

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.

LittleFunny
  • 8,155
  • 15
  • 87
  • 198
  • I'm assuming you are using Functions V2. Does your function application use any extensions? – Connor McMahon Apr 02 '18 at 23:56
  • 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 Apr 03 '18 at 01:41
  • If it is solved, you could add an answer. If you still have other issue, you create a new SO thread. – Tom Sun - MSFT Apr 03 '18 at 05:54

3 Answers3

1

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?

scottrudy
  • 1,633
  • 1
  • 14
  • 24
1

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

Jim Speaker
  • 1,303
  • 10
  • 28
  • 1
    THIS !!!! absolutely is helped me, upgrading the azure function to V2 (SDK) you need to ensure the function server is also configured to V2 – RedKlouds May 08 '20 at 00:12
0

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.

LittleFunny
  • 8,155
  • 15
  • 87
  • 198