This is a migrated thread and some comments may be shown as answers.

JustCode complains about HttpUtility

3 Answers 82 Views
Code Analysis
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carl
Top achievements
Rank 1
Carl asked on 05 Jan 2011, 07:36 PM
VS 2010 compiles System.Net.HttpUtility just fine in a Windows Phone 7 Silverlight project.

However, JustCode complains that HttpUtility is an unknown entity and falsely reports errors. Perhaps, this problem may be related to the existence and confusion about HttpUtility in both System.Net and System.Web ? 

3 Answers, 1 is accepted

Sort by
0
Stefan Avramov
Telerik team
answered on 06 Jan 2011, 01:39 PM
Hi Carl,

 Thanks for the feedback. Unfortunately I wasn't able to reproduce your problem, so I'll need some more information from you on how exactly are you using System.Net.HttpUtility and anything that you think is specific to your code. You mentioned using System.Web? Which one exactly since every one i tried was incompatible with Windows Phone Application Projects and couldn't be referenced there.
 If it is no big trouble for you It will best if you send us a small project where this problem occurs.

Kind Regards,
Stefan Avramov
the Telerik team
0
Carl
Top achievements
Rank 1
answered on 06 Jan 2011, 06:11 PM
The default template for a Silverlight for Windows Phone 7 Application Project from Microsoft has a reference to System.Net. When using a project built from this Microsoft template on a  xaml page with code behind that inherits from PhoneApplicationPage, then JustCode complains about any use of HttpUtility regardless of whether it is written as System.Net.HttpUtility or only as HttpUtility. In my use of HttpUtility, I am calling the HttpUtility.UrlEncode() function on some input text. VS 2010 flags no errors and compiles the code without warnings or errors. However, JustCode complains that HttpUtility is an unknown entity.



0
Stefan Avramov
Telerik team
answered on 07 Jan 2011, 02:23 PM
Hi Carl,

 Thanks for writing back on this one. Which version of Windows Phone Development Tools are  you using because with 10.0.30319 it's working fine.  Also can you please try to create a new Windows Phone Application and try to use the HttpUtiliy in the MainPage.xaml.cs for example, with nothing else but the one project and the base files it creates.

Kind regards,
Stefan Avramov
the Telerik team
Browse the videos here>> to help you get started with JustCode
Tags
Code Analysis
Asked by
Carl
Top achievements
Rank 1
Answers by
Stefan Avramov
Telerik team
Carl
Top achievements
Rank 1
Share this question
or