RickStrahl / Westwind.AspnetCore.LiveReload

ASP.NET Core Live Reload Middleware that monitors file changes in your project and automatically reloads the browser's active page
Other
469 stars 42 forks source link

Question: .NET 6 going forward #55

Closed dotnetshadow closed 2 years ago

dotnetshadow commented 3 years ago

Hi Rick,

I was just wondering how you see your library going forward for .net 6 type apps as outlined here: https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/ https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes#net-hot-reload-user-experience-for-editing-managed-code-at-runtime-

So far your library has been invaluable, but is some or most of it going to be done via the .net 6 cli etc?

RickStrahl commented 3 years ago

I hope the changes in .NET Core will make the need for this library less pertinent. It would be much nicer if tooling like this was built-in and wouldn't require adding special libraries to a project - except in special situations.

I haven't looked at the progress in 6.0 although it sounds promising. But in .NET 5.0 the tooling was inadequate, and in many situations didn't work for me at all. There have been lots of problems with configuration and lack of documentation. So, we'll have to see how it works out in 6.0 - it's not an easy problem to solve especially in a way that's easy to use and I think this is likely going to be the key point in providing this solution effectively in .NET 6.0.

Regardless of whether the native tooling works or not this project will continue, because it provides the functionality to applications that might need this. I have several tools that are generic servers and having the ability to provide live reload functionality as part of those servers - without any external tooling - is very useful (if use case specific).

RickStrahl commented 2 years ago

With .NET 6 out I think that .NET 6's dotnet watch run with the live reload features enabled will serve most users just fine. I still run into problems in some applications however, as the Live reload functionality just doesn't work (while it does work in Visual Studio via Debug/Hot Reload which is different).

So in short Visual Studio in particular and dotnet watch run handles most use cases that this component tries to alleviate.

This component will continue to be relevant however, for:

  1. Scenarios where Hot Reload doesn't work for some reason
  2. For live reload integration scenarios in applications rather than during development

Personally 2. applies to me as I have LiveReloadServer which is a distributable Web server application that includes its own LiveReload functionality and uses this library as a core feature. This can be applied to any distributed server application that for one reason or another wants to support live content reloading.

So the library will continue to be developed for that reason at minimum and for use cases where the tooling does not work.