7

Looking for a similar functionality like browsersync give for Node applications to auto reload browser with any file change.

Running Asp.Net Core (aka Asp.net 5) with dnx-watch and it restarts the Kestrel web server with any C# code change, but still have to refresh browser manually to see the changes whether its client or server file changes. Using Gulp for build pipeline and thinking of using it to do both dnx-watch and reload browser, but cannot find any example online.

Love to have some help on this.

Thanks

Nexus23
  • 6,195
  • 9
  • 50
  • 67
  • For those who came here looking to simply recompile code automatically, see [https://docs.asp.net/en/latest/tutorials/dotnet-watch.html](https://docs.asp.net/en/latest/tutorials/dotnet-watch.html) – Jon Oct 05 '16 at 15:14
  • @Jonathan727 refresh was something I was looking for after recompiling. There is some concept implemented in one of my SPA based project. Visit: https://github.com/asadsahi/AspNetCoreSpa – Nexus23 Oct 20 '16 at 09:01

2 Answers2

3

There's no official support for your scenario, sorry!

However, it's interesting and I would like to have it at least on the backlog. Can you please open a request at https://github.com/aspnet/dotnet-watch ?

Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103
  • Ok, thanks @Victor. How can I request in dotnet-watch project? will be be a new issue on github? – Nexus23 Mar 10 '16 at 11:35
1

1) It is possible to just use gulp and browsersync. It works good and fast, but is a bit tricky because you have to start IIS-Express first and use browsersync in proxymode.

2) A much better solution is the Visual Studio Extension Browser Reload on Save made by Mads Kristensen, a member of the Asp.Net team.