Problem
I freshly installed mono on OS X Lion, compiled and ran my first-ever csharp “hello world”, and then attempted a web request…
But I’m missing HttpUtility.
gmcs GoogleExample.cs -r:System.Web.Services -r:System.Web
GoogleExample.cs(14,32): error CS0103: The name `HttpUtility' does not exist in the current context
Compilation failed: 1 error(s), 0 warnings
What to do?
History
I code C, NodeJS, Python, Ruby, etc. No noob to programming, just to mono.
I just installed mono (MRE Runtime, MDK, and MonoDevelop) on OS X via these instructions: http://www.go-mono.com/mono-downloads/download.html
Then I went off to play hello world with these instructions:
http://www.mono-project.com/Mono_Basics
And now I want to create a web request following this tutorial:
http://www.codeproject.com/KB/cross-platform/introtomono1.aspx?msg=3229009
End Goal:
Naturally, I want to create a JSON-based chat server as my first csharp project.
Apparently google couldn’t find it either, so they wrote there own api-compatible version:
Here’s a workaround:
Compile Google’s version as a library
Edit
GoogleExample.csto include that namespaceRecompile using the library
Side Note: the RegEx (or perhaps URL) in the example
GoogleExample.csis out of date, so it never returns results, but at least it compiles and runs.