Abiosoft.DotNet.DevReload 0.1.4

Live reload for ASP.NET development

Install-Package Abiosoft.DotNet.DevReload -Version 0.1.4
dotnet add package Abiosoft.DotNet.DevReload --version 0.1.4
<PackageReference Include="Abiosoft.DotNet.DevReload" Version="0.1.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Abiosoft.DotNet.DevReload --version 0.1.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DevReload

Nuget

Live reload for ASP.NET core development.

Install

dotnet add package Abiosoft.DotNet.DevReload --version 0.1.4

Usage

Use the middleware. Usually in Startup.cs

using Abiosoft.DotNet.DevReload;

...
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    if (env.IsDevelopment())
    {
        app.UseDevReload();
    }
...
}

Then, add the tag helper to your main layout file.

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Abiosoft.DotNet.DevReload

...

<environment include="Development">
    <devreload></devreload>
</environment>

And that's all. Just use dotnet watch run and your browser will auto reload.

How

DevReload monitors the ASP.NET app by long polling a REST endpoint and monitor static files with FileSystemWatcher.

Configure

You can modify the directories and file extensions for static files only.

app.UseDevReload(new DevReloadOptions
{
    Directory = "./wwwroot",
    IgnoredSubDirectories = new string[] { ".git", ".node_modules" },
    StaticFileExtensions = new string[] { "css", "js", "html" },
});

Demonstration

demonstration

DevReload

Nuget

Live reload for ASP.NET core development.

Install

dotnet add package Abiosoft.DotNet.DevReload --version 0.1.4

Usage

Use the middleware. Usually in Startup.cs

using Abiosoft.DotNet.DevReload;

...
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    if (env.IsDevelopment())
    {
        app.UseDevReload();
    }
...
}

Then, add the tag helper to your main layout file.

@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Abiosoft.DotNet.DevReload

...

<environment include="Development">
    <devreload></devreload>
</environment>

And that's all. Just use dotnet watch run and your browser will auto reload.

How

DevReload monitors the ASP.NET app by long polling a REST endpoint and monitor static files with FileSystemWatcher.

Configure

You can modify the directories and file extensions for static files only.

app.UseDevReload(new DevReloadOptions
{
    Directory = "./wwwroot",
    IgnoredSubDirectories = new string[] { ".git", ".node_modules" },
    StaticFileExtensions = new string[] { "css", "js", "html" },
});

Demonstration

demonstration

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.4 169 8/1/2019
0.1.3 84 7/28/2019
0.1.2 59 7/28/2019
0.1.1 59 7/28/2019