Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

'Microsoft.Graph.BasePostMethodRequestBuilder`1' Not Found #197

Closed
Txusete opened this issue Nov 13, 2016 · 3 comments
Closed

'Microsoft.Graph.BasePostMethodRequestBuilder`1' Not Found #197

Txusete opened this issue Nov 13, 2016 · 3 comments

Comments

@Txusete
Copy link

Txusete commented Nov 13, 2016

Hello,

I'm trying to copy 1 file from OneDrive to another folder in OneDrive using the suggested method from the documentation for c#:

var asyncStatus = await FileManager.FileManager.SharedInstance.OneDriveDevice .Drive .Items[file.Id] .Copy(strDestinationName, new ItemReference { Id = destinationFolderID }) .Request() .PostAsync();
However this provoques the following exception:
"Was not possible to load the type 'Microsoft.Graph.BasePostMethodRequestBuilder`1' from the assembly 'Microsoft.Graph.Core, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

I'm using Microsoft.OneDriveSDK v 2.0.6 and Microsoft.Graph.Core v=1.3.0.

I can copy files from OneDrive to Local and from Local to OneDrive, but i guess this type is not used for that.
Is it possible that i'm missing some library?
Thanks!

@cdmayer
Copy link
Contributor

cdmayer commented Nov 14, 2016

Something is fishy here. BasePostMethodRequsetBuilder was deprecated in Graph 1.2.1, and the OneDriveSDK was updated to reflect that as of 2.0.6. You should not be getting that exception if you are using the updated package. Can you try uninstalling and reinstalling the Nuget package to make sure you're on the correct version?

@Txusete
Copy link
Author

Txusete commented Nov 15, 2016

Hello,

I reinstalled the Nuget package and looks like this issue was solved. However now i have a Microsoft.Graph.ServiceException.
From a previous Issue i saw that a possible workaround was to include
.Request(new[] { new Option("Prefer", "respond-async") }), but its not making any difference for me.

Below the full exception error in case it could be of any help:

`Error: at Microsoft.Graph.HttpProvider.d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Graph.BaseRequest.d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.OneDrive.Sdk.ItemCopyRequest.d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at CopyFilesHelper.CopyFiles.<CopyFolder_OneDrive2OneDrive>d__193.MoveNext() in Y:\Documents\DocumentsWin\Visual Studio 2015\Projects\SpeedyFiles_Git\SpeedyFiles\CopyFilesHelper\CopyFiles.cs:line 13645

Exception of type 'Microsoft.Graph.ServiceException' was thrown.`

@baywet
Copy link
Member

baywet commented Oct 2, 2024

Thank you for reaching out and for your patience. This SDK is being officially deprecated. See #259 for more information

@baywet baywet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants