Abiosoft.DotNet.DevReload 0.1.3

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.3
dotnet add package Abiosoft.DotNet.DevReload --version 0.1.3
<PackageReference Include="Abiosoft.DotNet.DevReload" Version="0.1.3" />
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.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Abiosoft.DotNet.DevReload, 0.1.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Abiosoft.DotNet.DevReload as a Cake Addin
#addin nuget:?package=Abiosoft.DotNet.DevReload&version=0.1.3

// Install Abiosoft.DotNet.DevReload as a Cake Tool
#tool nuget:?package=Abiosoft.DotNet.DevReload&version=0.1.3
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.3

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

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.1.4 702 8/1/2019
0.1.3 306 7/28/2019
0.1.2 256 7/28/2019
0.1.1 253 7/28/2019