TsTeaTime
TsTeaTime

Reputation: 921

Azure Function Adding Reference to Sharepoint.dll Failing

I am getting an error when I attempt to add a reference to the Microsoft.Sharepoint.dll into my Azure function class. It keeps giving me the following error:

Package Sharepoint 15.0.0 is not compatible with net462 (.NetFramework, Version=v4.6.2). Package Sharepoint 15.0.0 supports microsoftsharepoint (Microsoft.SharePoint,version=v0.0).

Also the Microsoft.Sharepoint.Client.Runtime has a similar issue.

Given this I have followed other advice to switch the targeting framework to 4 and 4.5 but all of these seem to fail similarly. What is the supported framework for this and how can I add it into an azure function. Also I am dealing with an on-prem instance of sharepoint so I cannot connect via the online apis.

Upvotes: 0

Views: 295

Answers (1)

Joey Cai
Joey Cai

Reputation: 20127

The Microsoft.Sharepoint.dll have no dependencies so, it it no matter with framework. I test in my site and could install it correctly.

You could try to use the Package Manager console in Visual Studio to install instead of the Manager Packages tool for the project.

And if you use Manage Nuget Packages, delete Nuget's cache from the packages' manager configuration.

Upvotes: 1

Related Questions