Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

ASP.NET website edit during debug stopped working

$
0
0

Environment: Win7 Pro, VS2013 Utimate, ASP.NET Website, VB.NET

I was for many months (or at least I thought I was) editing vb.net class modules and codebehind modules while running debug.  Very useful to be able to watch the forms operate and make changes to the code without having to stop to recompile (even though the changes don't take effect until recompile). 

However, that stopped working a couple/three weeks ago, for no apparent reason.  Now, as soon as debug starts, the code is frozen.  I can still edit aspx pages, js and css, but not vb.net.

I originally thought this was an Edit and Continue problem however I've finally understood that Edit and Continue is really dynamic recompilation, where the newly edited code actually gets executed.  

So this is different. This is in a website, which again, I finally understand is not "smart" enough to support Edit and Continue. 

The best resolution I have is to open the website fresh from the file menu each time, bypassing the solutions file in the start window, which however omits all the settings from the previous debug settings.  Then I can edit during debug.  I can also delete the solutions file, which has the same effect, but is not necessary.  However, as soon as I save a new solutions file (VS asks for it every time) and reopen the site through that solutions file, I can no longer edit vb.net during debug.  

I can go through that cycle as many times as I want.  So it seems like something in the solutions file is preventing edit during debug.

I built a small test website to demonstrate the problem, attached.   I'm hoping someone has seen the same behavior and figured out what might be done about it.  Or might be able to explain that I'm asking for something that's specifically not supposed to work.  (I've considered changing from website to web application however considering budget, time and skill set that's not a good option at this point).

Any suggestions on this would be appreciated.  Thanks!

webconfig

    <?xml version="1.0"?>
     
    <configuration>
        <system.web>
          <compilation debug="true" strict="false" explicit="true" targetFramework="4.5" />
          <httpRuntime />
        </system.web>
    
    </configuration>
    
   
=== page
    
    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Test.aspx.vb" Inherits="Test" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:Label runat="server"
                ID="Label1"
                text="Whoa" />
    
            <asp:Button runat="server"
                ID ="Button1"
                text ="Test"
                />
        </div>
        </form>
    </body>
    </html>

==== Code behind

    Partial Class Test
        Inherits System.Web.UI.Page
    
        Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Select Case Me.Label1.Text
                Case "Whoa"
                    Me.Label1.Text = "Wow"
                Case "Wow"
                    Me.Label1.Text = "Whoa"
            End Select
        End Sub
    End Class

=== solutions file

    Microsoft Visual Studio Solution File, Format Version 12.00
    # Visual Studio 2013
    VisualStudioVersion = 12.0.31101.0
    MinimumVisualStudioVersion = 10.0.40219.1
    Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "0005_EnCTest(1)", "http://localhost:2039", "{4B173594-D476-4283-B656-A17B8972BABA}"
          ProjectSection(WebsiteProperties) = preProject
                UseIISExpress = "true"
                TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.5"
                Debug.AspNetCompiler.VirtualPath = "/localhost_2039"
                Debug.AspNetCompiler.PhysicalPath = "D:\4500_TESTS\0005_EnCTest\"
                Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_2039\"
                Debug.AspNetCompiler.Updateable = "true"
                Debug.AspNetCompiler.ForceOverwrite = "true"
                Debug.AspNetCompiler.FixedNames = "false"
                Debug.AspNetCompiler.Debug = "True"
                Release.AspNetCompiler.VirtualPath = "/localhost_2039"
                Release.AspNetCompiler.PhysicalPath = "D:\4500_TESTS\0005_EnCTest\"
                Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_2039\"
                Release.AspNetCompiler.Updateable = "true"
                Release.AspNetCompiler.ForceOverwrite = "true"
                Release.AspNetCompiler.FixedNames = "false"
                Release.AspNetCompiler.Debug = "False"
                SlnRelativePath = "D:\4500_TESTS\0005_EnCTest\"
          EndProjectSection
    EndProject
    Global
          GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|Any CPU = Debug|Any CPU
          EndGlobalSection
          GlobalSection(ProjectConfigurationPlatforms) = postSolution
                {4B173594-D476-4283-B656-A17B8972BABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {4B173594-D476-4283-B656-A17B8972BABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
          EndGlobalSection
          GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
          EndGlobalSection
    EndGlobal


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>