3
votes

enter image description here

I keep getting this message whenever I try to debug an azure function in VS2017 and I can't figure out why.

Any input or assistance appreciated.

It appears to be looking for some kind of azure web jobs library:

enter image description here

1
Do you get any error message in your function Cli output? - Jerry Liu
No errors are visible. - ar.dll
My understanding here is that JobHost.cs is part of the azure web jobs SDK. My function project has the Microsoft.Azure.WebJobs.ServiceBus Nuget package referenced (3.0.0-beta5) as the trigger on the function is "ServiceBusTrigger". I'm still unsure why the debugger is looking for that file in that specific directory, however. - ar.dll
Yes, it is. When do you get this message? After you debug(F5) your function, or after you trigger your function by sending message to service bus? Have you tried to continue to run your code when you got the exception? - Jerry Liu
"Exception thrown: 'System.Threading.Tasks.TaskCanceledException' in System.Private.CoreLib.dll" is the only error I can see. - ar.dll

1 Answers

1
votes

This 'System.Threading.Tasks.TaskCanceledException' in System.Private.CoreLib.dll should be a first chance exception when function is triggered, no need to worry as it has been handled by function host.

If you don't see any red error info in function cli window (pop out when debugging) and your code is successfully executed, this should be an internal error.

Can't reproduce it on my side, hence just offer some suggestions based on my understanding.

Delete function sdk folder %userprofile%\.nuget\packages\microsoft.net.sdk.functions and install latest 1.0.14 package in your function project.

If it doesn't work, I recommend you to download VoidMethodInvoker.cs or JobHost.cs to detect the exception. Then ignore it by configuring Exception settings. Met an internal exception on queue trigger before.