ASP.Net MVC HtmlHelpers

6 posts, 0 answers
  1. Stephen
    Stephen avatar
    45 posts
    Member since:
    Jul 2010

    Posted 10 Sep 2012 Link to this post

    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
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 12 Sep 2012 Link to this post

    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.

  3. DevCraft banner
  4. deesnider
    deesnider avatar
    14 posts
    Member since:
    Nov 2008

    Posted 19 Jun 2013 Link to this post

    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.
  5. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 19 Jun 2013 Link to this post

    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.
  6. deesnider
    deesnider avatar
    14 posts
    Member since:
    Nov 2008

    Posted 20 Jun 2013 Link to this post

    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.
  7. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 21 Jun 2013 Link to this post

    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.
Back to Top
DevCraft banner