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

ASP.Net MVC HtmlHelpers

5 Answers 86 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.
Stephen
Top achievements
Rank 1
Stephen asked on 10 Sep 2012, 08:27 AM
Hi,



I recently rebuilt my development environment after installing Windows 8 and decided to give JustCode a go given that I have a license for it (Longtime ReSharper user). 



I'm still getting used to the differences but my biggest gripe is the false warnings it gives inside ASP.Net MVC 3 HtmlHelpers and views that use those helpers.  ReSharper does not exhibit this behaviour.



Examples:



Unknown type or namespace

This member cannot be referenced from a static-context

Unknown method <method> of <type>

Unknown type of variable m (Inside a lamda expression)





Edit: VS2012, 32 bit OS, ASP.Net MVC3 (Razor), C#.  I have refreshed code analysis.

Stephen

5 Answers, 1 is accepted

Sort by
0
Zdravko
Telerik team
answered on 12 Sep 2012, 02:56 PM
Hello,

 Thanks for the feedback.
In order to investigate your issues I will ask you to report some of the good code reds by following this example.
We will also need your logs located at %localappdata%\JustCode\Logs.

We will greatly appreciate it, if you send us a sample project with some of the errors. This way we will be able to reproduce the issue on our side and fix it.
Thanks.

Greetings,
Zdravko
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
deesnider
Top achievements
Rank 1
answered on 19 Jun 2013, 05:02 AM
Easy to reproduce. Add a reference to the MVC futures assembly to your MVC project and the appropriate using:

@using Microsoft.Web.Mvc


Try accessing any of the helper extensions such as this one in a cshtml file. This one builds a link with strongly typed controller reference:

@(Html.ActionLink<PlayerController>(c=>c.Index(Model.Player.PlayerID), "Main"))<br>

Or define your own extension methods for HtmlHelper, etc. in a separate class. JustCode will not resolve these at all. Everything not standard in the HtmlHelper core class will fail/marked as red. Big annoyance in MVC/Razor. Main reason I don't use JC anymore.
0
Zdravko
Telerik team
answered on 20 Jun 2013, 04:32 AM
Hi Craig,

 Thanks for your feedback.
I tried to reproduce your error, but it seems it is already fixed in the latest JustCode version.
Would you install it and confirm?
Thanks.

Regards,
Zdravko
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
0
deesnider
Top achievements
Rank 1
answered on 20 Jun 2013, 07:30 PM
I'm pretty sure I was running the latest stable release at the time of writing. Last stable release was 6/12.

Are you talking about the dev builds? 

I can verify tonight.
0
Zdravko
Telerik team
answered on 21 Jun 2013, 02:25 PM
Hi Craig,

 I tried to reproduce the error with JustCode Version Q2 2013 (2013.2.611.6), but without avail.
Would you refresh our code analysis from JustCode's menu -> Analysis -> Refresh Code Analysis and check if it persists?

Sometimes there is a cause in some of the other projects inside the solution that could be of fault. If you still see the error would you send me your solution or a sample so we could investigate?
We will highly appreciate it.
Thanks.

Regards,
Zdravko
Telerik
Share what you think about JustCode with us, so we can help you even better! You can use the built-in feedback tool inside JustCode, our forum, or our JustCode feedback portal.
Tags
Code Analysis
Asked by
Stephen
Top achievements
Rank 1
Answers by
Zdravko
Telerik team
deesnider
Top achievements
Rank 1
Share this question
or