compiler errors and refactoring

Last post 04-07-2008 5:13 PM by tgmdbm. 14 replies.

Sort Posts:

  • compiler errors and refactoring

    01-01-2008, 5:04 PM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    Hi

    Am i doing something wrong? because i don't get compiler errors in my aspx pages. and when i refactor my code, the changes don't affect the aspx pages.

    I remember reading somewhere that this should be happening. (probably a post on this forum) 

     

  • Re: compiler errors and refactoring

    01-01-2008, 6:12 PM
    • All-Star
      20,998 point All-Star
    • Jeev
    • Member since 11-24-2005, 12:49 PM
    • Posts 3,163

    Hi ,

    Well don't think refactoring has any thing to do with the compilation errors you are getting and don't think what refactoring would solve the problems. Try looking at the error list to find out what exactly is wrong with your application

    Jeev
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If you get the answer to your question, please mark it as the answer.
  • Re: compiler errors and refactoring

    01-01-2008, 6:30 PM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs
    you might want to read the question again!
  • Re: compiler errors and refactoring

    01-01-2008, 8:36 PM
    • Member
      59 point Member
    • brianjlowry
    • Member since 11-07-2006, 2:13 PM
    • Richmond, VA
    • Posts 46

     I've been having the same issue. Life's just not going to be the same until R# 4.0 is released.

  • Re: compiler errors and refactoring

    01-02-2008, 6:48 AM
    • Member
      176 point Member
    • hhariri
    • Member since 12-10-2007, 10:07 AM
    • Posts 70

    I have the same problem and I just assumed it's R#, so I just deal with it. I can't live w/o R# 

    --
    http://hadihariri.com
    http://twitter.com/hhariri
  • Re: compiler errors and refactoring

    01-02-2008, 9:38 AM
    • Member
      59 point Member
    • brianjlowry
    • Member since 11-07-2006, 2:13 PM
    • Richmond, VA
    • Posts 46

    Yes, I am not using R# until 4.0 is released as it screws up lots of the lambda/ linq code. So, on that note, its not R#'s problem necessarily.

  • Re: compiler errors and refactoring

    01-02-2008, 4:24 PM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    Had a look around but it's not that easy to search for R# (the # just gets ignored).

    What is it? Where can i find out about it?

    Are you sure that this isn't supposed to work by default? i'm going to try to find the article i read which mentioned this. i'll post it here later when i find it. 

  • Re: compiler errors and refactoring

    01-02-2008, 4:52 PM
    • Member
      59 point Member
    • brianjlowry
    • Member since 11-07-2006, 2:13 PM
    • Richmond, VA
    • Posts 46

    I was saying I think it should work by default. Another commenter said he thought it was R# (Resharper) that was causing the issue as Resharper doesn't fully support 2008. I'm not using Resharper as it doesn't support LINQ, Lambda, and who knows what else... probably automatic properties as well, so it would throw errors on legitimate code.

    If you haven't used Resharper, I would highly recommend downloading a trial for 2005 and checking it out. It makes life so much easier. Big Smile
     

  • Re: compiler errors and refactoring

    01-02-2008, 5:29 PM
    • Member
      176 point Member
    • hhariri
    • Member since 12-10-2007, 10:07 AM
    • Posts 70

     Resharper from Jetbrains. You have to check it out.

    --
    http://hadihariri.com
    http://twitter.com/hhariri
  • Re: compiler errors and refactoring

    01-03-2008, 6:39 PM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    Ahh yes, Resharper, know it, love it, going to convince the boss to buy it for us.

    Never referred to it as R# tho, surely it should be Re#er, lol. Plus there's a sourcefource project called R#, very confusing.

    Anyway, yeah this isn't about Resharper. I couldn't find the article i was talking about. It was about the MVCToolkit, saying that using the lamda expressions like...

    <%= Html.ActionLink<HomeController>( x => x.Index(), "Home" ) %> 

    ...would respond to visual studio refactorings like Rename if i renamed the controller or the method name.

    I guess they were either mistaken or using unreleased bits.

  • Re: compiler errors and refactoring

    01-09-2008, 5:41 AM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    So, should this be possible in VS2008 without any 3rd party apps?
     

  • Re: compiler errors and refactoring

    01-10-2008, 5:17 AM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    I remembered where i heard this should work.

    It was Scott Hanselman's video from http://www.asp.net/downloads/3.5-extensions/

    no wonder i couldn't find the article. lol. 

  • Re: compiler errors and refactoring

    04-01-2008, 12:40 PM
    • Member
      2 point Member
    • yood
    • Member since 03-17-2008, 3:41 AM
    • Posts 3

    It does not work for me. In VS2008, I renamed a controller class and the built-in refactoring did not change any of my html.actionlink<controllername>(...) in my aspx files.

    Can somebody from the asp.net team please confirm whether the refactoring that you tout will work out-of-the-box in visual studio? or do we need to get third party tools to do it?

  • Re: compiler errors and refactoring

    04-07-2008, 2:22 PM
    • Member
      21 point Member
    • dmo145
    • Member since 03-28-2008, 8:34 PM
    • Posts 16

    Having the same problem. While I can see not being able auto rename on refactor being annoying, I think its even WORSE that we're not getting compiler errors.

     That is, as tgmdbm pointed out, if I have somthing like:

    <%= Html.ActionLink<xController>(x => x.index(), "Home") %>

    and I rename the xController class to yController the compiler DOESN'T yell at me about the error in the view on build. I just get runtime errors. To me this kinda defeats to purpose of using the lambda for strong typing in the first place.

    Any advice as to the cause/work around or explination of the expectations being incorrect would be greatly appreciated.

     Thanks everyone!

  • Re: compiler errors and refactoring

    04-07-2008, 5:13 PM
    • Contributor
      4,372 point Contributor
    • tgmdbm
    • Member since 12-17-2007, 9:08 AM
    • Posts 883
    • ASPInsiders
      TrustedFriends-MVPs

    For some strange reason, visual studio doesn't do this.  

    Resharper is the future. 

Page 1 of 1 (15 items)