I need UrlEncode in my application because i am submitting a form to my server. My app is a quick console utility targeting to .NET 3.5.
The page says i need System.Web assembly, yet when i try to add the reference it isnt there. My WebServer application has it which is also targeted to 3.5 but this console app cant reference it. Why not? how can i access UrlEncode?
You can – just make sure you’ve added a reference to System.Web.dll, which may not be in a console project by default.
I suspect this isn’t in the Client Profile, mind you – I don’t know if that’s an issue for you.
I’ve just tested this with a console app from the command line:
I was able to just compile with
but I suspect the default response file contains more assembly references than the default Console Application project template in Visual Studio…