Comments
-
Your code may not be able to compile if you call async method in the SDK without Microsoft.NETCore.Portable.Compatibility installed. If your code already compiles and works fine then you don't have to install it.
-
The SDK supports .Net Core 1.1. You just need to make sure you have * <PackageTargetFallback>portable-net45+win8</PackageTargetFallback> added to both main and test projects. * Microsoft.NETCore.Portable.Compatibility nuget package installed for main project. * Visual studio doesn't return any error when the build process…
-
We've added some instructions to the github README. If you need more info about PCL .NET Standard compatibility you can check out https://docs.microsoft.com/en-us/nuget/schema/msbuild-targets#packagetargetfallback and https://docs.microsoft.com/en-us/dotnet/articles/standard/library Thanks, Qiming
-
Hi Jan, The SDK contains a PCL libarary which is compatible with .NET Standard. If you are using project.json you need add portable-net45+win8 to your import section e.g. "frameworks": { "netstandard1.1": { "imports": [ "portable-net45+win8" ] } } If your are using .csproj you need add…
-
You can still have your library target .NET standard. The SDK package contains a PCL version which is compatible with .NET standard. What you need to do is change imports from dnxcore50 to portable-net45+win8 and add Microsoft.NETCore.Portable.Compatibility as dependency.
-
Hi Frans, async Task library is shipped with .Net 4.5 which is not available for .Net 4.0. You can use TaskEx.Run instead which is part of the BCL library that Dropbox SDK depends on.
-
Hi Andriy, Length and Position are available only if CanSeek property of the stream is true and not all stream supports seeking (FileStream and MemoryStream can seek but NetworkStream cannot). You shouldn't make the assumption that the stream returned by GetContentAsStreamAsync supports seeking.
-
In the latest version of .NET SDK, you can create DropboxClient using custom http client in which you can specify a longer timeout. See https://github.com/dropbox/dropbox-sdk-dotnet/blob/master/Examples/SimpleTest/Program.cs as example.
-
Thanks for your feedback Tzach! We will add more documentation for the examples.
-
The sdk provides async interface to all api calls. The example is a simple console application so the main function has to wait for the top level async call to complete. But this is not equivalent to making every api call blocking. Although the top level async task is blocking, it can still contain multiple parallel…
-
Hi Nathan, I think this is not sdk level thing. What you need is a way to get progress for some long running action in MVC application. I think with SignalR you may be able to do that.
-
Below is example code about how to do chunk upload. private async Task Upload(string file) { const string TargetPath = "/test.zip"; const int ChunkSize = 4096 * 1024; using (var fileStream = File.Open(file, FileMode.Open)) { if (fileStream.Length <= ChunkSize) { await this.client.Files.UploadAsync(TargetPath, body:…
-
Thanks for your stack trace. I think you are supposed to get a TaskCancelationException given default time out of 100 sec for HttpClient. However if you are using mono, you may get a ObjectDisposedException due to the bug in http://forums.xamarin.com/discussion/44502/objectdisposedexception-when-canceling-postasync In…
-
Hi, I think the way you throw the exception loses the stack trace of the actual exception. Instead of throw new Exception(ex.Message); could you just do throw; instead?
-
Hi, Could you provide us some additional information as below? It would very helpful for us to figure out what went wrong. 1. Does this error also occur for smaller size file (like 4mb or smaller)? 2. Could you provide the stack trace for the exception?
-
Hi, Would you mind providing your static void Main function? That would be helpful for us to figure out how you make the async call.