Click here to Skip to main content
16,022,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to add some CSOM functionality to my C# program such that I will be allowed to do CRUD operations on a Microsoft List (aka SharePoint List). Assuming you know what CSOM and CRUD is, I will not bore you with the details of the specifics. The end result of adding the references to the DLLS and the proper namespace, I get an error in my IDE:

> "Could not install package 'Microsoft.SharePoint.Client.dll
> 15.0.4420.1017'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', but the package does not
> contain any assembly references or content files that are compatible
> with that framework. For more information, contact the package
> author."

And so, I have two questions:

What .NetFramework version is compatible with Microsoft.SharePoint.Client.dll 15.0.4420.1017 ?
(question 1)

What Microsoft.SharePoint.Client.dll version is compatible with .NETFramework Version=v4.7.2 ?
(question 2)

What I have tried:

I tried using my local version of the DLL's but I thought I would ask wich version is compatable instead of doing extensive trial-ane-error.
Posted
Updated 10-Jun-24 19:55pm
v2

Given that this version was last updated in 2014, it's highly likely that you are looking at .NET 4.5/.4.5.1 as these were the Visual Studio 2013 versions of .NET Framework.
 
Share this answer
 
Comments
Richard Deeming 11-Jun-24 3:44am    
Looking at the dependencies in the NuGet package explorer[^], it seems you are correct. :)
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Be very careful. The package you are trying to reference is not published by Microsoft, and could be an attempt to distribute malware.

Use the official Microsoft NuGet package instead:
NuGet Gallery | Microsoft.SharePointOnline.CSOM 16.1.24908.12000[^]
 
Share this answer
 
Comments
Pete O'Hanlon 11-Jun-24 3:48am    
Excellent advice, and a timely warning that NuGet isn't always a clean playground.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900