ASP.NET with visual studios 2010 problem with editing while debugging

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urbn
    New Member
    • Jul 2008
    • 7

    ASP.NET with visual studios 2010 problem with editing while debugging

    I upgraded to visual studios 2010 last week. I also migrated a large web application over that I was working on.

    I ran into a huge issue with CodeFile and CodeBehind. I ran the "convert to web application" feature for the project which included designer.vb files and required me to go though can change CodeFile to CodeBehind.

    Now everything IS working within the web application after 40ish hours of fixing everything, but now the ability to edit .aspx.vb files while debugging is no longer available. I can edit the .aspx files just fine while debugging but not the codebehind files.

    I have tried all the suggestions I have found online and none of these work. What DOES work is changing CodeBehind to CodeFile. Once I do this I can edit while debugging no problem. BUT doing this breaks the pages because the designer.vb file is no longer updated or used.

    Does anyone know what could be causing this?

    More details:
    ASP.net using VB
    Visual studios 2010 .net 4.0
    x86 machine with debugging set to x86.
    project is set to debug (not release)
    Various settings are checked ie no optimization, etc


    Summary: Can't edit while debugging if referecing file by CodeBehind=file name.aspx.vb. Changeing to CodeFile=filena me.aspx.vb allows editing of ASPX.VB files but causes the file to no longer use designer.vb file.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I've never been able to edit while debugging an ASP.NET application....

    -Frinny

    Comment

    • urbn
      New Member
      • Jul 2008
      • 7

      #3
      I was able to with 2005 no problem. But this was when the site was just a website and not a web application. Once I converted the site to a web application (and this adding the designer.vb files) it would no longer allow editing aspx.vb files, but editing the .aspx file (HTML,JS,CSS,Im ages,Etc).

      From my understanding what little information I could find is that codebehind compiles your files before debugging/releasing where as codefile dosen't require compiling, so maybe this is the problem. I do know that I was able to do it in the past and that other people have had simular problems which normally were cause by having optimized code set in debugging or edit and continue not being set.

      Comment

      • urbn
        New Member
        • Jul 2008
        • 7

        #4
        Well I never found a fix for this but I did find a work around. Hopefully this helps someone else if they have to deal with this.

        Currently all my pages are set to use codefile="filen ame.aspx.vb". I can edit while debugging just fine.

        Now if you end up having to add any controls (textbox for example) add the control, change codefile to codebehind and save. Designer file will be updated. Then switch back to codefile and save again.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Thanks for posting the work around solution :)
          I'm sure it will help others.

          -Frinny

          Comment

          Working...