Azure Functions giving exception while loading Dependency Dlls
See original GitHub issueRepro steps
Provide the steps required to reproduce the problem
- Create a custom assembly custom dll (domain.dll)
- Custom dll should internally has a dependency on LinqKit
- Add the LinqKit refrence to nuget packages
Expected behavior
The function should work fine and the dependent dll should be loaded in the runtime.
Actual behavior
Get Exception at Runtime :
Message: Could not load file or assembly 'LinqKit, Version=1.1.7.2, Culture=neutral, PublicKeyToken=bc217f8844052a91' or one of its dependencies. The system cannot find the file specified., Stack Trace: at Marketware.Domain.Centric.Segments.SegmentDefinition.SegmentDefinitions.CreateEncounterFilterExpressionForDate(String segmentFilterJson)
at Marketware.Domain.Centric.Segments.SegmentDefinition.SegmentDefinitions.EncounterFilterDefinitionTuple(String filterString)
at Marketware.Domain.Centric.Segments.SegmentDefinition.Services.SegmentDefinitionService.GetEncounterFilterDefinition(String filterString)
at Submission#0.AddUpdateSegmentDefinitions(String databaseName, TraceWriter log, String audienceType, Guid segmentId, String filter, ISegmentDefinitionService segmentDefinitionService) in D:\home\site\wwwroot\SegmentProcessorHandler\run.csx:line 160
at Submission#0.<LoadSegmentDefinitions>d__8.MoveNext() in D:\home\site\wwwroot\SegmentProcessorHandler\run.csx:line 146
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Submission#0.<Run>d__7.MoveNext() in D:\home\site\wwwroot\SegmentProcessorHandler\run.csx:line 78, Source: Marketware.Domain, Inner Exception:
2016-09-22T10:02:49.389 Function completed (Success, Id=2e708a21-262b-49a7-8cc5-5c741f7426b0)
2016-09-22T10:02:49.389 , Message: Could not load file or assembly 'LinqKit, Version=1.1.7.2, Culture=neutral, PublicKeyToken=bc217f8844052a91' or one of its dependencies. The system cannot find the file specified., Stack Trace: at Marketware.Domain.Centric.Segments.SegmentDefinition.SegmentDefinitions.CreateEncounterFilterExpressionForDate(String segmentFilterJson)
at Marketware.Domain.Centric.Segments.SegmentDefinition.SegmentDefinitions.EncounterFilterDefinitionTuple(String filterString)
at Marketware.Domain.Centric.Segments.SegmentDefinition.Services.SegmentDefinitionService.GetEncounterFilterDefinition(String filterString)
at Submission#0.AddUpdateSegmentDefinitions(String databaseName, TraceWriter log, String audienceType, Guid segmentId, String filter, ISegmentDefinitionService segmentDefinitionService) in D:\home\site\wwwroot\SegmentProcessorHandler\run.csx:line 160
at Submission#0.<LoadSegmentDefinitions>d__8.MoveNext() in D:\home\site\wwwroot\SegmentProcessorHandler\run.csx:line 146
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Submission#0.<Run>d__7.MoveNext() in
Known workarounds
NA
Related information
NA
- Programming language used
- Links to source
Issue Analytics
- State:
- Created 7 years ago
- Comments:28 (12 by maintainers)
Top Results From Across the Web
Azure Functions giving exception while loading ...
We have an Azure function which uses our custom dll (domain.dll), our dll internally has a dependency on LinqKit so we added the...
Read more >Azure Functions giving exception while ... - appsloveworld.com
Coding example for the question Azure Functions giving exception while loading Dependency Dlls.
Read more >Bring dependencies and third-party libraries to Azure ...
One of the simplest ways to bring in dependencies is to put the files/artifact together with the functions app code in Functions project ......
Read more >Authenticating Azure AD Function fails with "Could not load ...
Verify that the required assembly is deployed to the Azure Function App. You can check the "Dependencies" section in the Azure portal for...
Read more >Use dependency injection in .NET Azure Functions
There are differences in how you override dependencies and how configuration values are read with Azure Functions on the Consumption plan.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes we are using version 0.5 of runtime
Function.json
I had to add a separate ref inside ExcelComponents.Reader.EPPlus to stop the runtime error.