Abiosoft.DotNet.DevReload 0.1.2

Live reload for ASP.NET development

There is a newer version of this package available.
See the version list below for details.
Install-Package Abiosoft.DotNet.DevReload -Version 0.1.2
dotnet add package Abiosoft.DotNet.DevReload --version 0.1.2
<PackageReference Include="Abiosoft.DotNet.DevReload" Version="0.1.2" />
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.2
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.2

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.

Configure

You can modify the directories and file extensions.

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.2

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.

Configure

You can modify the directories and file extensions.

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 340 8/1/2019
0.1.3 116 7/28/2019
0.1.2 85 7/28/2019
0.1.1 84 7/28/2019