Question

I have a timer job where I need to update some information in a database. The DbContext is implemented in an external assembly, using EFCore. When I run the timer job, I get the following exception:

The Execute method of job definition MyTimerJob (ID 7fc1c5a7-4965-49ff-844d-84a274f6873c) threw an exception. More information is included below. Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The system cannot find the file specified.

I see this was a common issue. However, I am not sure how to fix this in my scenario. The file is in the GAC, I have performed IISRESET and restarted the timer service, however, that did not help. Do you have any ideas on how I could fix this?

Was it helpful?

Solution

Not without some sort of proxy layer (similar to how CSOM is implemented). SharePoint Server uses the .NET Framework, not .NET Core, so the binaries are incompatible.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top