15

I've run through the tutorial on this here: http://www.asp.net/vnext/overview/aspnet-vnext/getting-started-with-aspnet-vnext-and-visual-studio

I am following step 7 in section 2 - "With the browser still open, open Class1.cs and change the message text to "New message from ClassLibrary1!".

Unfortunately after making the code change, when I refresh the browser it is the same a before. I have to recompile for the change to take effect.

Any ideas why? I want to see the magic happen!

Windows 7 64bit Microsoft Visual Studio Professional 14 CTP Version 14.0.21730.1 DP Microsoft .NET Framework Version 4.5.50938

project.json:

{
    "dependencies": {
        "Helios": "0.1-alpha-build-0585",
        "Microsoft.AspNet.Mvc": "0.1-alpha-build-1268",
        "Microsoft.AspNet.Identity.Entity": "0.1-alpha-build-1059",
        "Microsoft.AspNet.Identity.Security": "0.1-alpha-build-1059",
        "Microsoft.AspNet.Security.Cookies": "0.1-alpha-build-0506",
        "Microsoft.AspNet.Server.WebListener": "0.1-alpha-build-0520",
        "Microsoft.AspNet.StaticFiles": "0.1-alpha-build-0443",
        "Microsoft.Data.Entity": "0.1-alpha-build-0863",
        "Microsoft.Data.Entity.SqlServer": "0.1-alpha-build-0863",
        "Microsoft.Framework.ConfigurationModel.Json": "0.1-alpha-build-0233",
        "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0-alpha",
        "Classlibrary1": ""
    },
    "commands": {
        /* Change the port number when you are self hosting this application */
        "web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
    },
    "configurations": {
        "net45": {
            "dependencies": {
                "System.Data": "",
                "System.ComponentModel.DataAnnotations": ""
            }
        },
        "k10": {
        }
    }
}

Paul

2 Answers 2

29

You are probably running with the debugger attached. The file watcher doesn't work with the debugger attached. Why? Long story short: IIS (express) is restarted to pick up assembly changes, so that would not work with the debugger attached because it would kill your debugging session.

Start the website without debugging, then change a code file and refresh - magic happens.

Later edit: To start the application wihtout debugging either use Ctrl + F5 or Debug -> Start without debugging

Sign up to request clarification or add additional context in comments.

3 Comments

this is also discussed here: forums.asp.net/t/…
I found ctrl + shift + w (view in browser) works best because it doesn't restart the app if it's already running.
Is this very annoying limitation ever going to be resolved, or we are stuck with it? (I guess you can kill the attached debugger and start a new session, right?)
1

It seems, that this is a know issue, that will hopefully get fixed later https://github.com/aspnet/Home/issues/22

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.