One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
BMurri
8 years agoExplorer | Level 4
When creating DropboxClient I'm getting an unable to find System.Net.Http, Version=4.0.0.0 assembly
Working on upgrading a 8.1 winphone app to API v2 and we get an exception about not finding/loading the System.Net.Http assembly whenever the constructor for the DropboxClient is called. Tried installing the System.Net.Http NuGet package and it says none of my project types apply. Tried installing the Microsoft.Net.Http NuGet package and it tells me that the assembly it found can't be used (it finds a version 1.5.0.0 and it requires a 4.0.0.0). Installing the v2 api nuget package didn't depend on any other packages for our project types.
Anyone have any ideas? I've tried rebinding in app.config with no success. I've tried creating other project types for the system.net.http nuget package and can't get it to create a reference to one of its included assemblies using any incantation that applies to WinPhone (meaning I don't have a clear path to follow trying to subvert the system).
Anyone else using DropBox with winphone 8.1 apps?
- Greg-DB
Dropbox Staff
Can you share the code that causes the error, and the full error/output you're getting? Thanks in advance!- BMurriExplorer | Level 4
https://github.com/BMurri/WinPass
Project to run is "KeePass" within the solution.
Error is thrown in KeePass\Sources\DropBox\DropBoxUtils.cs line 12.
Exact same error is thrown using real devices running Windows Mobile 10 and emulators running Windows Phone 8.1.System.IO.FileNotFoundException Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Stack Trace: at Dropbox.Api.DropboxRequestHandlerOptions..ctor(DropboxClientConfig config, Stringoauth2AccessToken) at Dropbox.Api.DropboxClient..ctor(String oauth2AccessToken, DropboxClientConfig config) at KeePass.Sources.DropBox.List.RefreshList() at KeePass.Sources.DropBox.List.OnNavigatedTo(Boolean cancelled, NavigationEventArgs e) at KeePass.Utils.KeePassPage.OnNavigatedTo(NavigationEventArgs e) at Microsoft.Phone.Controls.PhoneApplicationPage.InternalOnNavigatedTo(NavigationEventArgs e) at Microsoft.Phone.Controls.PhoneApplicationPage.Microsoft.Phone.Controls.IPhoneApplicationPage.InternalOnNavigatedToX(NavigationEventArgs e) at System.Windows.Navigation.NavigationService.RaiseNavigated(Object content, Uri uri, NavigationMode mode, Boolean isNavigationInitiator, IPhoneApplicationPage existingContentPage, IPhoneApplicationPage newContentPage) at System.Windows.Navigation.NavigationService.Journal_NavigatedExternally(Object sender, JournalEventArgs args) at System.Windows.Navigation.Journal.OnNavigatedExternally(String name, Uri uri, NavigationMode mode) at System.Windows.Navigation.Journal.DoExternalNavigation(NavigationDirection direction, Boolean isResumeActivation, Boolean isRefresh) at System.Windows.Navigation.Journal.NavigateTo(NavigationDirection direction, Boolean isResumeActivation) at Microsoft.Phone.TaskModel.Interop.Task.FireOnNavigateTo(Int32 direction, BooleanisResumeActivation)Uri: /Sources/DropBox/List.xaml?token=****************
- BMurriExplorer | Level 4To build, you will need to copy the KeePass\Utils\ApiKeys.cs, renaming it ApiKeys.release.cs (in same folder), remove the lines starting with '#', and supply the appropriate keys & secrets.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 hours ago
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 or Facebook.
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!