cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

.NET 4.0 Reference could not be resolved

New member | Level 2
New member | Level 2

Hi there

 

I am currently trying to integrate Dropbox into a bigger system running .NET 4.0, the issue is that when I install the Dropbox.Net NuGet into my class library and rebuild the solution, I receive the following errors, from another library that references it.

 

Severity Code Description Project File Line Suppression State
Warning The primary reference "location/DropboxProject.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "location/DropboxProject.dll" or retarget your application to a framework version which contains "System.Runtime, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Easy2u.PCS

 

Severity Code Description Project File Line Suppression State
Warning The primary reference "location/DropboxProject.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "location/DropboxProject.dll" or retarget your application to a framework version which contains "System.Threading.Tasks, Version=1.5.11.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Easy2u.PCS

 

Severity Code Description Project File Line Suppression State
Warning The primary reference "location/DropboxProject.dll" could not be resolved because it has an indirect dependency on the framework assembly "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which could not be resolved in the currently targeted framework. ".NETFramework,Version=v4.0". To resolve this problem, either remove the reference "location/DropboxProject.dll" or retarget your application to a framework version which contains "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". Easy2u.PCS

 

I figured it has to do with the fact that the Class Library that uses my Dropbox Project, is using older versions of those 3 dependencies, is there a way to solve this issue?

 

Thank you for the help.

4 Replies 4
Highlighted

Re: .NET 4.0 Reference could not be resolved

Dropboxer
Dropboxer
I'm not sure offhand what the cause of this would be or how to solve it. Are you able to remove the reference or retarget the application, per the error message?

In any case, what version of Visual Studio are you using?

Also, there are some posts here that may be helpful:

https://stackoverflow.com/questions/16756186/system-net-http-could-not-be-resolved-in-the-currently-...
https://stackoverflow.com/questions/26918631/dependency-on-the-framework-assembly-system-runtime-ver...
Highlighted

Re: .NET 4.0 Reference could not be resolved

New member | Level 2
New member | Level 2

I figured out that it is because the second Class Library also needs the Microsoft.Bcl.Build nuget/reference in order to work.

 

But thanks for your time

Highlighted

Re: .NET 4.0 Reference could not be resolved

Explorer | Level 4

Dear Nicodk,

I too have the same problem now.  How did you resolve it? How to did you make the second class library to get with Microsoft.Bcl.Build nuget/reference?

I am delibrately in need of your help.

Highlighted

Re: .NET 4.0 Reference could not be resolved

Dropboxer
Dropboxer

@ManikandanIndia I'm afraid I can't offer much help with this since this is more about managing dependencies in Visual Studio/NuGet/.NET as opposed to using the Dropbox API itself, but maybe @Nicodk can offer some advice.

Otherwise, there are some posts with detials and fixes for similar errors that may be useful:

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?