0
votes

I've added a Nuget-package to my .NET Core "Azure Function"-project:

Install-Package SharePointPnPCoreOnline -Version 2.22.1801

But I receive an error in my code:

Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: StoreInDatabase ---> System.IO.FileNotFoundException : Could not load file or assembly 'SharePointPnP.IdentityModel.Extensions, Version=1.2.3.0, Culture=neutral, PublicKeyToken=5e633289e95c321a' or one of its dependencies. The system cannot find the file specified.

This assembly should be included from the Nuget Package, but it doesn't.
As I'm new to .NET Core and Azure Functions, does anyone know how to solve this one?

Update I see the package has another version number than in the error-details.

Version number incorrect

But still no idea how to solve this... any ideas?

1
Is the referenced assembly compliant to .NET Standard? - Mikhail Shilkov
I have no idea... how can I check this? - RubenHerman
Looking at some of the package's dependencies on its NuGet page, I would say that it's not compatible with .NET Standard - Jamie Taylor

1 Answers

2
votes

Looking at the nuget package with the wrong version number, I saw that previous versions are "hidden" in NuGet...

https://www.nuget.org/packages/SharePointPnP.IdentityModel.Extensions/

I solved this by installing the latest version of the package So in my case, I just ran the command:

Install-Package SharePointPnP.IdentityModel.Extensions -Version 1.2.3