1

Is it possible to use Google APIs Client Library for .NET in a WP7 project?

I've tried to add a new reference to DotNetOpenAuth.dll and I'm getting the folowing error.

Reference cannot be added to DotNetOpenAuth.dll because it was not built using the Windows Phone runtime. Windows Phone projects will work only with Windows Phone assemblies.

Is it possible to solve?

rpf
  • 3,612
  • 10
  • 38
  • 47

2 Answers2

1

Try Portable Library Tools from MSDN. Read about them here. Now reference Google .Net library in the portable library, also reference this portable library project in WP7 project. Now, write a small wrapper over the Google apis in the portable library project and use them from your WP7 project. Referencing works but I did not use it, you can give it a try once.

Prakash
  • 823
  • 12
  • 28
0

I would think it would be possible to use the Google APIs from WP7. I've not used them myself, but it looks like you use them by making HTTP requests which, if memory serves me right, is possible on WP7.

With regards to the DotNetAuth.dll it is more then likely built against the Full or Client Profile version of the .NET Framework and therefore can't be used by WP7. In order to do this, then a WP7 specific version of the assembly will be have to be compiled.

MotoSV
  • 2,348
  • 17
  • 27
  • How can I do that? How can I compile a version of this API to the WP7? – rpf Mar 17 '12 at 09:38
  • To use the Api you would need to build URL and send it using the WebRequest class. The API isn't actually compiled by you or included in your application. If you want to have the DotNetAuth library you could get hold of the source code and compile it for WP7. – MotoSV Mar 18 '12 at 07:26
  • He's asking about the library, not the direct APIs. – Robaticus Mar 20 '12 at 12:16