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

3
  • this is also discussed here: forums.asp.net/t/…
    – qbik
    Jun 24, 2014 at 6:06
  • I found ctrl + shift + w (view in browser) works best because it doesn't restart the app if it's already running. Apr 16, 2015 at 12:38
  • 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?)
    – gdoron
    May 24, 2016 at 15:40
1

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

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.