Reputation: 31
I am trying to use google Drive API V2 to upload a file. My code is :
cStream = File.Open(strDOCFile, FileMode.Open);
var cUploadCommand = service.Files.Insert(new Google.Apis.Drive.v2.Data.File(), cStream, strUploadedMimeType);
var cResult = cUploadCommand.Upload();
cStream.Close();
But I'm getting the error after I perform the command "cUploadCommand.Upload()" in the cResult.Exception parameter, and the result is returned instantly:
Value cannot be null. Parameter name: baseUri
what the hell?
Upvotes: 0
Views: 424
Reputation: 31
Solution: After battling for two hours with this error, It seems like the "Microsoft.Threading.Tasks" and "Microsoft.Threading.Tasks.Extensions" was not copied correctly to my binary folder. The required files are :
Microsoft.Threading.Tasks.dll
Microsoft.Threading.Tasks.Extensions.Desktop.dll
Microsoft.Threading.Tasks.Extensions.Desktop.xml
Microsoft.Threading.Tasks.Extensions.dll
Microsoft.Threading.Tasks.Extensions.xml
Microsoft.Threading.Tasks.xml
Once I had these files in my binary folder, the error disappeared! it seems like this is part of the library called "microsoft.bcl.async"
Upvotes: 1