question

Elba-3401 avatar image
0 Votes"
Elba-3401 asked ·

Package SharePoint.Client.Runtime 15.0.0 is not compatible with netcoreapp3.1

I am trying to use C# in Visual Studio to write to a SharePoint List . So I tried to install the Nuget Package called SharePoint.Client.Runtime

I am getting the error message below.



     Severity    Code    Description    Project    File    Line    Suppression State
     Error    NU1202    Package SharePoint.Client.Runtime 15.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1). Package SharePoint.Client.Runtime 15.0.0 supports: microsoftsharepointclientruntime (Microsoft.SharePoint.Client.Runtime,Version=v0.0)    trySharePoint    B:\project\C-Sharp-4\SharePoint\trySharePoint\trySharePoint\trySharePoint.csproj    1    


Any thoughts on how to resolve this error or any alternatives?

dotnet-csharpoffice-sharepoint-server-developmentdotnet-package-management
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Elba-3401 ,

Is there any update ? Did the answer below resolve the issue ?


Thanks

Best Regards

0 Votes 0 ·

1 Answer

Jerryzy-MSFT avatar image
0 Votes"
Jerryzy-MSFT answered ·

Hi @Elba-3401,

SharePoint On-Premise Server Client Object 15.x is not compatible with .NET Core solution.

Currently only SharePoint Online CSOM support for .NET Core (SharePoint On-Premise didn't support) , please check this blog:

72737-snipaste-2021-03-01-09-27-40.png

For detailed information, please refer this blog:

.NET Standard version of SharePoint Online CSOM APIs

If you are using SharePoint Online, then install the CSOM from Nuget like this:

Microsoft.SharePointOnline.CSOM 16.1.20211.12000

Thanks
Best Regards


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.