I am currently working with a Azure Function created in visual studio. It is a timer function that calls some common code to write to a queue.
Running the code locally does not cause any issues. Runs just fine but when publish it I get the following error:
Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.||System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.WindowsAzure.Storage, Version=9.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at Esperanto.Core.Function.JobGetterLogic.SendJobsToQue() at JobGetter.TimedJob.Run(TimerInfo myTimer, TraceWriter log)
Here is my webjob code:
public static class TimedJob
{
[FunctionName("TimedJob")]
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, TraceWriter log)
{
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
try
{
var brain = new CoreLogic.Function.JobGetterLogic();
var result = brain.SendJobsToQue();
}
catch (Exception e)
{
log.Info(e.Message + "||" + e.ToString());
}
}
}
The system cannot find the file specified
, check for the dll and see if it exists in correct/desired directory – Christopher H.