1
votes

I have an Azure Function (.netstandard 2.0) that fails to run because of FileLoadException. Normally I would use Fuslog to find out which dependency is missing but I have not found a way to RDP the machine running my Azure Function. Right now, through various logs, I only get the following information:

System.IO.FileLoadException : Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file.

I can see that the right version of the file is actually there via Server Explorer. So it seems to be a dependency issue.

How can I debug this?

1
Check out this link github.com/Azure/Azure-Functions/issues/679 in case it helpskim
I will try that as soon as possible. In the meantime, is there anything else that could have been done to get more information about such issue? Is there an alternative to RDP that could have been used in a serverless environment?Kzrystof
Nope, no RDP to the underlying system is available. Just the logs that it generate, see e.g. docs.microsoft.com/en-us/azure/azure-functions/…kim

1 Answers

3
votes

Basically your Function App is a plug-in which gets loaded into runtime. Runtime has its own dependencies, and if you happen to use the same dependency but of higher version, you get a runtime error.

WindowsAzure.Storage is definitely in this list.

For runtime v1 the most reliable way to figure out the exact versions is to look into this file, just search for the package in question.

Runtime v2 doesn't have it yet.

Then downgrade your reference to the same version.

A better solution is discussed in this issue.