OneDrive / onedrive-sdk-csharp

OneDrive SDK for C#! https://dev.onedrive.com
Other
294 stars 143 forks source link

Exception when trying to create a share-link #186

Closed miroppb closed 7 years ago

miroppb commented 7 years ago

When I try to create a "view" share link using: var create = await this.oneDriveClient.Drive.Items[uploadedItem.Id].CreateLink("view").Request().PostAsync();

I get an exception: {"Could not load type 'Microsoft.Graph.BasePostMethodRequestBuilder1' from assembly 'Microsoft.Graph.Core, Version=1.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.":"Microsoft.Graph.BasePostMethodRequestBuilder1"}

I have updated the SDK and Microsoft.Graph.Core to the latest versions, but I'm still getting the error. Please help.

Also, on a side-note, how do I set a timeout for uploading? I can upload small files, but if I try to upload anything over ~50MB, it gives a timeout error

Thanks in advance

cdmayer commented 7 years ago

Please update to the newest version of the SDK, 2.0.4. It fixed the issue you are having (Graph changed the name of the class).

For larger files, I would recommend using the ChunkedUploadProvider. You can see it in action here.