angelazno / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Use another namespace for HttpUtility #477

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
[Revision 1069] removed dependencies from Full .NET. The revision indroduced a 
"custom" HttpUtility class. It comes from Mono source code. Obviously Mono uses 
the same .NET namespaces.

IMHO it's not a good idea to overwrite framework classes.
In some scenario you cannot use the new dlls. In asp.net you'll get:
The type 'System.Web.HttpUtility' exists in both ....
Details here:
http://code.google.com/p/google-gdata/issues/detail?id=429#c12

Proposed solution: use another namespace for the custom HttpUtility

See attached patch file.

Original issue reported on code.google.com by fht...@gmail.com on 8 Feb 2011 at 2:02

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch, I'll give it a go as soon as possible.

Just to clarify, the custom HttpUtility class wasn't added in rev 1069 but it 
has been included since a lot of time ago. That revision only made some 
modifications to it.

Anyway, I agree we should avoid overwriting framework classes.

Original comment by ccherub...@google.com on 8 Feb 2011 at 2:19

GoogleCodeExporter commented 8 years ago
Committed in rev. 1071

Thanks Fabrizio!

Original comment by ccherub...@google.com on 9 Feb 2011 at 3:22

GoogleCodeExporter commented 8 years ago
Has the change been included in current Google.Apis.dll? I still have the same 
conflict issue.

Thanks,
Jun

Original comment by top...@gmail.com on 20 Aug 2011 at 12:21

GoogleCodeExporter commented 8 years ago
Yes, the patch was included and is available from both the binary distribution 
and the source repository.
Try doing a checkout of the code 
(http://code.google.com/p/google-gdata/source/checkout) and building the dlls 
yourself 

Original comment by ccherub...@google.com on 20 Aug 2011 at 12:37

GoogleCodeExporter commented 8 years ago
I am experiencing this right now. Trying to put together a G+ project.

Original comment by hismight...@gmail.com on 30 Sep 2011 at 2:54

GoogleCodeExporter commented 8 years ago
FYI, the Google+ API is not GData-based so you should use this other library 
instead:

http://code.google.com/p/google-api-dotnet-client/

Original comment by ccherub...@google.com on 30 Sep 2011 at 3:17

GoogleCodeExporter commented 8 years ago
Good catch, but that is actually the library I am attempting to use right now. 
Still getting that error, which led me here.  The Google.Apis.dll is including 
the System.Web.HttpUtility namespace, which conflicts with anyone trying to use 
it for an ASP.Net website. :(

Original comment by hismight...@gmail.com on 30 Sep 2011 at 3:21

GoogleCodeExporter commented 8 years ago
If your problem is with the other library, please open a new issue in the 
appropriate issue tracker 
(http://code.google.com/p/google-api-dotnet-client/issues/list) and mention 
this discussion there.

Original comment by ccherub...@google.com on 30 Sep 2011 at 3:25