Microsoft.Sharepoint.Client.dll not giving access to method

Jaime Fernández Ribelles 21 Reputation points
2020-11-17T10:36:30.837+00:00

Hello,

I am trying to use the method Web.CreateAnonymousLink ( https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-csom/mt143091(v=office.15) ) to create a link for a Sharepoint file. The problem is that even though I think I am using the correct dll (dowloaded by NuGet, can be find here https://www.nuget.org/packages/Microsoft.SharePoint.Client/ ), Visual Studio (2017, .NetFramework 4.5.2) doesn't recognize the method, so I can't use it.
Any ideas about what is happening?

Thank you.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. ZhengyuGuo 10,586 Reputation points Moderator
    2020-11-18T07:16:23.633+00:00

    Hi @Jaime Fernández Ribelles ,

    For SharePoint Online, the SharePoint.Client.CSOM library is below:

    Install-Package Microsoft.SharePointOnline.CSOM -Version 16.1.20616.12000  
    

    Microsoft.SharePointOnline.CSOM

    This library version will have Web.CreateAnonymousLink method:
    40623-snipaste-2020-11-18-15-15-59.png


    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.