Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Dan C.10
9 years agoExplorer | Level 4
Exception when using ASP.NET Core
I'm trying to use the Dropbox API with an ASP.NET Core application (v1.1.0). It compiles and resolves all the dependencies when doing a "dotnet restore", but when I call one of the Dropbox API method...
Greg-DB
Dropbox Community Moderator
9 years agoThanks for the report! I can't seem to reproduce this issue though. Can you let us know the following so we can look into it?
- What platform/version are you running this on?
- What version of the Dropbox API library do you have installed?
- What's the code that causes this exception?
Thanks in advance!
- What platform/version are you running this on?
- What version of the Dropbox API library do you have installed?
- What's the code that causes this exception?
Thanks in advance!
Dan C.10
9 years agoExplorer | Level 4
Hi. Thank you for your very quick reply!
I've found the issue. It was because when I created the project, it had this in the project.json
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
}
So that was saying that my assembly targets netstandard 1.6, but the 'imports' bit is telling it to lie to the compiler saying that dependencies targeting dnxcore50 will work. Hence why it compiled, but fell over at runtime.
I've fixed the issue by just targeting dnxcore50 instead.
- Dan C.109 years agoExplorer | Level 4
It would be great if Dropbox API targetted the latest dotnet standard though :)
- Qiming Y.9 years ago
Dropbox Staff
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.- Dan C.109 years agoExplorer | Level 4
Brilliant! This works perfectly. Thanks a lot for your help! :)
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!