We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

MichalS's avatar
MichalS
Explorer | Level 3
8 years ago

.NET API V2 NuGet installation problem on VS 2010 MVC3 application

Hi,

 

Can't use API after NuGet installation, even on new ASP.NET MVC3 application. But it works ok for new WindowsForms application (not of my interest)

 

Symptoms:

 

1.

line 'using Dropbox.Api; ' gives error "Error 7 The type or namespace name 'Dropbox' could not be found (are you missing a using directive or an assembly reference?) "

But before compilation failed autocomplete worked well with name 'Dropbox.Api' !

 

2.

8 similar warnings while building application: "Warning 9 The primary reference "Dropbox.Api, Version=0.1.6229.33336, Culture=neutral, PublicKeyToken=310f0e82fbb45d01, processorArchitecture=MSIL" 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 "Dropbox.Api, Version=0.1.6229.33336, Culture=neutral, PublicKeyToken=310f0e82fbb45d01, processorArchitecture=MSIL" or retarget your application to a framework version which contains "System.Net.Http, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". TdbWeb2"

 

Indeed, I have System.Net.Http referenced (by NuGet) in version 2.2.29.0

But luckily NuGet added also

<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
</dependentAssembly>

to my Web.config. So it seems not working. Maybe VS 2010 is too old for that?

 

3.

After installation I have a reference to Dropbox.Api but double-click on in does not show it in Object Browser as for other references.

 

 

If it cannot be solved - are Dropbox.Api sources available in public? I may build it by myself instead of using raw HTTP API.

 

My VS version is: 10.0.40219.1 SP1Rel

 

Thanks in advance for any help. We use Dropbox for running out business and successful migration to V2 is a must.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 12 months ago
325 Following

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!