├── src
├── ScriptReload.razor
├── BlazorScriptReload.csproj
└── wwwroot
│ └── BlazorScriptReload.lib.module.js
├── samples
└── BasicSample
│ ├── wwwroot
│ ├── about.js
│ ├── home.js
│ ├── animate.js
│ ├── favicon.png
│ ├── interactive.js
│ ├── gallery.js
│ ├── countdown.js
│ ├── app.css
│ └── lib
│ │ ├── bootstrap
│ │ └── dist
│ │ │ └── css
│ │ │ ├── bootstrap-reboot.min.css
│ │ │ ├── bootstrap-reboot.rtl.min.css
│ │ │ ├── bootstrap-reboot.rtl.css
│ │ │ ├── bootstrap-reboot.css
│ │ │ └── bootstrap-reboot.min.css.map
│ │ └── aos
│ │ ├── aos.js
│ │ └── aos.css
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── Components
│ ├── Routes.razor
│ ├── Pages
│ │ ├── Alert.razor
│ │ ├── Interactive.razor
│ │ ├── DynamicText.razor
│ │ ├── Home.razor
│ │ ├── Countdown.razor
│ │ ├── Error.razor
│ │ ├── StreamRendering.razor
│ │ ├── Gallery.razor
│ │ └── Animate.razor
│ ├── _Imports.razor
│ ├── App.razor
│ └── Layout
│ │ ├── MainLayout.razor
│ │ ├── MainLayout.razor.css
│ │ ├── NavMenu.razor
│ │ └── NavMenu.razor.css
│ ├── BasicSample.csproj
│ ├── Program.cs
│ └── Properties
│ └── launchSettings.json
├── BlazorScriptReload.png
├── LICENSE
├── BlazorScriptReload.sln
├── .gitignore
└── README.md
/src/ScriptReload.razor:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/about.js:
--------------------------------------------------------------------------------
1 | alert('External Script - About.razor');
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/home.js:
--------------------------------------------------------------------------------
1 | console.log('External Script - Home.razor');
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/animate.js:
--------------------------------------------------------------------------------
1 | // Animation on scroll
2 | AOS.init({
3 | duration: 1000
4 | });
--------------------------------------------------------------------------------
/BlazorScriptReload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devessenceinc/BlazorScriptReload/HEAD/BlazorScriptReload.png
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/devessenceinc/BlazorScriptReload/HEAD/samples/BasicSample/wwwroot/favicon.png
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/interactive.js:
--------------------------------------------------------------------------------
1 | window.showAlert = () => {
2 | alert('External Script - Interactive.razor');
3 | };
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/BasicSample/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/samples/BasicSample/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Routes.razor:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/gallery.js:
--------------------------------------------------------------------------------
1 | msnry = new Masonry('.masonry-grid', {
2 | percentPosition: true
3 | });
4 |
5 | imgLoad = imagesLoaded('.masonry-grid');
6 |
7 | imgLoad.on('progress', function (instance, image) {
8 | console.log("Image loaded: ", image.img.src);
9 | msnry.layout();
10 | });
11 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Alert.razor:
--------------------------------------------------------------------------------
1 | @page "/alert"
2 |
3 | Alert
4 |
5 |
6 |
7 |
8 |
About
9 |
10 | This page displays JavaScript alert messages
11 |
12 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Interactive.razor:
--------------------------------------------------------------------------------
1 | @page "/interactive"
2 | @rendermode InteractiveServer
3 |
4 | Interactive
5 |
6 | Interactive
7 |
8 | This page uses Interactive Rendering and displays an alert message
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/BasicSample/BasicSample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/_Imports.razor:
--------------------------------------------------------------------------------
1 | @using System.Net.Http
2 | @using System.Net.Http.Json
3 | @using Microsoft.AspNetCore.Components.Forms
4 | @using Microsoft.AspNetCore.Components.Routing
5 | @using Microsoft.AspNetCore.Components.Web
6 | @using static Microsoft.AspNetCore.Components.Web.RenderMode
7 | @using Microsoft.AspNetCore.Components.Web.Virtualization
8 | @using Microsoft.JSInterop
9 | @using BlazorScriptReload
10 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/DynamicText.razor:
--------------------------------------------------------------------------------
1 | @page "/dynamictext"
2 |
3 | Dynamic Text
4 |
5 | Dynamic Text
6 |
7 | This page displays the year dynamically using inline JavaScript
8 |
9 | @* manipulates a specific DOM element and is safe to reload *@
10 | Copyright (c) > <
11 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Home.razor:
--------------------------------------------------------------------------------
1 | @page "/"
2 |
3 | Home
4 |
5 |
6 |
7 |
8 | Home
9 |
10 | As you navigate to the various pages included in the left navigation menu you will observe that none of the <script> elements behave as expected. However, if you Enable Reload using the button at the top right and navigate to any of the pages, the <script> elements will execute.
11 |
12 | This page logs messages to the browser console
13 |
14 |
--------------------------------------------------------------------------------
/samples/BasicSample/Program.cs:
--------------------------------------------------------------------------------
1 | using BasicSample.Components;
2 |
3 | var builder = WebApplication.CreateBuilder(args);
4 |
5 | // Add services to the container.
6 | builder.Services.AddRazorComponents()
7 | .AddInteractiveServerComponents();
8 |
9 | var app = builder.Build();
10 |
11 | // Configure the HTTP request pipeline.
12 | if (!app.Environment.IsDevelopment())
13 | {
14 | app.UseExceptionHandler("/Error", createScopeForErrors: true);
15 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
16 | app.UseHsts();
17 | }
18 |
19 | app.UseHttpsRedirection();
20 |
21 | app.UseStaticFiles();
22 | app.UseAntiforgery();
23 |
24 | app.MapRazorComponents()
25 | .AddInteractiveServerRenderMode();
26 |
27 | app.Run();
28 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Countdown.razor:
--------------------------------------------------------------------------------
1 | @page "/countdown"
2 |
3 | Countdown
4 |
5 |
6 |
7 | Countdown
8 |
9 |
10 | Dec 25, 2025 00:00
11 | Christmas Day
12 | The countdown is on...
13 |
14 |
15 | Days
16 |
17 |
18 |
19 | Hours
20 |
21 |
22 |
23 | Minutes
24 |
25 |
26 |
27 | Seconds
28 |
29 |
30 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/App.razor:
--------------------------------------------------------------------------------
1 | @inject NavigationManager NavigationManager
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | @if (NavigationManager.Uri.Contains("?reload=true"))
24 | {
25 |
26 | }
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Blazor Script Reload
2 | Copyright (c) 2024-2025
3 | by Shaun Walker of Devessence Inc. (https://devessence.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/samples/BasicSample/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:4078",
8 | "sslPort": 44361
9 | }
10 | },
11 | "profiles": {
12 | "http": {
13 | "commandName": "Project",
14 | "dotnetRunMessages": true,
15 | "launchBrowser": true,
16 | "applicationUrl": "http://localhost:5177",
17 | "environmentVariables": {
18 | "ASPNETCORE_ENVIRONMENT": "Development"
19 | }
20 | },
21 | "https": {
22 | "commandName": "Project",
23 | "dotnetRunMessages": true,
24 | "launchBrowser": true,
25 | "applicationUrl": "https://localhost:7145;http://localhost:5177",
26 | "environmentVariables": {
27 | "ASPNETCORE_ENVIRONMENT": "Development"
28 | }
29 | },
30 | "IIS Express": {
31 | "commandName": "IISExpress",
32 | "launchBrowser": true,
33 | "environmentVariables": {
34 | "ASPNETCORE_ENVIRONMENT": "Development"
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Error.razor:
--------------------------------------------------------------------------------
1 | @page "/Error"
2 | @using System.Diagnostics
3 |
4 | Error
5 |
6 | Error.
7 | An error occurred while processing your request.
8 |
9 | @if (ShowRequestId)
10 | {
11 |
12 | Request ID: @RequestId
13 |
14 | }
15 |
16 | Development Mode
17 |
18 | Swapping to Development environment will display more detailed information about the error that occurred.
19 |
20 |
21 | The Development environment shouldn't be enabled for deployed applications.
22 | It can result in displaying sensitive information from exceptions to end users.
23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development
24 | and restarting the app.
25 |
26 |
27 | @code{
28 | [CascadingParameter]
29 | private HttpContext? HttpContext { get; set; }
30 |
31 | private string? RequestId { get; set; }
32 | private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
33 |
34 | protected override void OnInitialized() =>
35 | RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
36 | }
37 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Layout/MainLayout.razor:
--------------------------------------------------------------------------------
1 | @inherits LayoutComponentBase
2 | @inject NavigationManager NavigationManager
3 |
4 |
5 |
8 |
9 |
10 |
11 | Use the button to enable or disable Blazor Script Reload >>
12 |
13 | @if (NavigationManager.Uri.Contains("?reload=true"))
14 | {
15 |
Disable Reload
16 | }
17 | else
18 | {
19 |
Enable Reload
20 | }
21 |
22 |
23 |
24 | @Body
25 |
26 |
27 |
This solution was developed by the Blazor experts at Devessence . Check out the open source project on GitHub!
28 |
29 |
30 |
31 |
32 |
33 |
34 | An unhandled error has occurred.
35 |
Reload
36 |
🗙
37 |
38 |
--------------------------------------------------------------------------------
/src/BlazorScriptReload.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 | BlazorScriptReload
8 | Shaun Walker
9 | Devessence Inc
10 | A solution for using JavaScript in Blazor Web Applications
11 | Devessence Inc
12 | 1.0.6
13 | https://github.com/devessenceinc/BlazorScriptReload.git
14 | LICENSE
15 | README.md
16 | true
17 | true
18 | embedded
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | all
34 | runtime; build; native; contentfiles; analyzers; buildtransitive
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/BlazorScriptReload.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.0.31903.59
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorScriptReload", "src\BlazorScriptReload.csproj", "{05291163-6BC9-415A-BB66-61A47A7BB6BE}"
7 | EndProject
8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{72817B90-7355-402D-8538-3CB4A8CF45E9}"
9 | EndProject
10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BasicSample", "samples\BasicSample\BasicSample.csproj", "{A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {05291163-6BC9-415A-BB66-61A47A7BB6BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {05291163-6BC9-415A-BB66-61A47A7BB6BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {05291163-6BC9-415A-BB66-61A47A7BB6BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {05291163-6BC9-415A-BB66-61A47A7BB6BE}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6}.Release|Any CPU.Build.0 = Release|Any CPU
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | GlobalSection(NestedProjects) = preSolution
31 | {A4EEDBD2-96AF-404C-A5AD-3A33968D7EF6} = {72817B90-7355-402D-8538-3CB4A8CF45E9}
32 | EndGlobalSection
33 | GlobalSection(ExtensibilityGlobals) = postSolution
34 | SolutionGuid = {96BE6E22-44D3-4D16-8A69-E99E21AC117C}
35 | EndGlobalSection
36 | EndGlobal
37 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/StreamRendering.razor:
--------------------------------------------------------------------------------
1 | @page "/streamrendering"
2 | @attribute [StreamRendering]
3 |
4 | Weather
5 |
6 | Stream Rendering
7 |
8 | This page shows an alert in a page that is using Stream Rendering
9 |
10 |
11 |
12 | @if (forecasts == null)
13 | {
14 | Loading...
15 | }
16 | else
17 | {
18 |
19 |
20 |
21 | Date
22 | Temp. (C)
23 | Temp. (F)
24 | Summary
25 |
26 |
27 |
28 | @foreach (var forecast in forecasts)
29 | {
30 |
31 | @forecast.Date.ToShortDateString()
32 | @forecast.TemperatureC
33 | @forecast.TemperatureF
34 | @forecast.Summary
35 |
36 | }
37 |
38 |
39 | }
40 |
41 | @code {
42 | private WeatherForecast[]? forecasts;
43 |
44 | protected override async Task OnInitializedAsync()
45 | {
46 | // Simulate asynchronous loading to demonstrate streaming rendering
47 | await Task.Delay(500);
48 |
49 | var startDate = DateOnly.FromDateTime(DateTime.Now);
50 | var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
51 | forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
52 | {
53 | Date = startDate.AddDays(index),
54 | TemperatureC = Random.Shared.Next(-20, 55),
55 | Summary = summaries[Random.Shared.Next(summaries.Length)]
56 | }).ToArray();
57 | }
58 |
59 | private class WeatherForecast
60 | {
61 | public DateOnly Date { get; set; }
62 | public int TemperatureC { get; set; }
63 | public string? Summary { get; set; }
64 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/countdown.js:
--------------------------------------------------------------------------------
1 | Countdown = function () {
2 | var enddate = document.getElementById("countdown-enddate");
3 | if (enddate === null) {
4 | return;
5 | }
6 |
7 | dateEnd = new Date(enddate.innerHTML);
8 | dateEnd = dateEnd.getTime();
9 |
10 | if (isNaN(dateEnd)) {
11 | return;
12 | }
13 |
14 | setInterval(calculate, 1000);
15 |
16 | function calculate() {
17 | var enddate = document.getElementById("countdown-enddate");
18 | if (enddate === null) {
19 | return;
20 | }
21 |
22 | var dateStart = new Date();
23 | var dateStart = new Date(dateStart.getUTCFullYear(),
24 | dateStart.getUTCMonth(),
25 | dateStart.getUTCDate(),
26 | dateStart.getUTCHours(),
27 | dateStart.getUTCMinutes(),
28 | dateStart.getUTCSeconds());
29 | var timeRemaining = parseInt((dateEnd - dateStart.getTime()) / 1000)
30 |
31 | if (timeRemaining >= 0) {
32 | var days = parseInt(timeRemaining / 86400);
33 | timeRemaining = (timeRemaining % 86400);
34 | var hours = parseInt(timeRemaining / 3600);
35 | timeRemaining = (timeRemaining % 3600);
36 | var minutes = parseInt(timeRemaining / 60);
37 | timeRemaining = (timeRemaining % 60);
38 | var seconds = parseInt(timeRemaining);
39 |
40 | if (document.getElementById("countdown-days") !== null) {
41 | document.getElementById("countdown-days").innerHTML = parseInt(days, 10);
42 | }
43 | if (document.getElementById("countdown-hours") !== null) {
44 | document.getElementById("countdown-hours").innerHTML = ("0" + hours).slice(-2);
45 | }
46 | if (document.getElementById("countdown-minutes") !== null) {
47 | document.getElementById("countdown-minutes").innerHTML = ("0" + minutes).slice(-2);
48 | }
49 | if (document.getElementById("countdown-seconds") !== null) {
50 | document.getElementById("countdown-seconds").innerHTML = ("0" + seconds).slice(-2);
51 | }
52 | } else {
53 | return;
54 | }
55 | }
56 | }
57 |
58 | // initiate countdown
59 | Countdown();
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Layout/MainLayout.razor.css:
--------------------------------------------------------------------------------
1 | .page {
2 | position: relative;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | main {
8 | flex: 1;
9 | }
10 |
11 | .sidebar {
12 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
13 | }
14 |
15 | .top-row {
16 | background-color: #f7f7f7;
17 | border-bottom: 1px solid #d6d5d5;
18 | justify-content: flex-end;
19 | height: 3.5rem;
20 | display: flex;
21 | align-items: center;
22 | }
23 |
24 | .top-row ::deep a, .top-row ::deep .btn-link {
25 | white-space: nowrap;
26 | margin-left: 1.5rem;
27 | text-decoration: none;
28 | }
29 |
30 | .top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
31 | text-decoration: underline;
32 | }
33 |
34 | .top-row ::deep a:first-child {
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | }
38 |
39 | @media (max-width: 640.98px) {
40 | .top-row {
41 | justify-content: space-between;
42 | }
43 |
44 | .top-row ::deep a, .top-row ::deep .btn-link {
45 | margin-left: 0;
46 | }
47 | }
48 |
49 | @media (min-width: 641px) {
50 | .page {
51 | flex-direction: row;
52 | }
53 |
54 | .sidebar {
55 | width: 250px;
56 | height: 100vh;
57 | position: sticky;
58 | top: 0;
59 | }
60 |
61 | .top-row {
62 | position: sticky;
63 | top: 0;
64 | z-index: 1;
65 | }
66 |
67 | .top-row.auth ::deep a:first-child {
68 | flex: 1;
69 | text-align: right;
70 | width: 0;
71 | }
72 |
73 | .top-row, article {
74 | padding-left: 2rem !important;
75 | padding-right: 1.5rem !important;
76 | }
77 | }
78 |
79 | #blazor-error-ui {
80 | color-scheme: light only;
81 | background: lightyellow;
82 | bottom: 0;
83 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
84 | box-sizing: border-box;
85 | display: none;
86 | left: 0;
87 | padding: 0.6rem 1.25rem 0.7rem 1.25rem;
88 | position: fixed;
89 | width: 100%;
90 | z-index: 1000;
91 | }
92 |
93 | #blazor-error-ui .dismiss {
94 | cursor: pointer;
95 | position: absolute;
96 | right: 0.75rem;
97 | top: 0.5rem;
98 | }
99 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Layout/NavMenu.razor:
--------------------------------------------------------------------------------
1 | @inject NavigationManager NavigationManager
2 |
3 |
8 |
9 |
10 |
11 |
62 |
63 | @code {
64 | private string querystring = "";
65 |
66 | protected override void OnParametersSet()
67 | {
68 | if (NavigationManager.Uri.Contains("?reload=true"))
69 | {
70 | querystring = "?reload=true";
71 | }
72 | else
73 | {
74 | querystring = "";
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Pages/Gallery.razor:
--------------------------------------------------------------------------------
1 | @page "/gallery"
2 |
3 | Gallery
4 |
5 |
6 |
7 |
8 |
9 | Gallery
10 |
11 | @if (_news == null)
12 | {
13 | Loading...
14 | }
15 | else
16 | {
17 | This page displays a visualization of images using the Masonry and ImagesLoaded JavaScript libraries. This demonstrates how BlazorScriptReload supports the ordering of scripts to ensure dpeendencies are loaded correctly.
18 |
19 |
35 | }
36 |
37 | @code {
38 | private List _news = [];
39 |
40 | protected override void OnInitialized()
41 | {
42 | Random random = new Random();
43 |
44 | for (int i = 0; i < 10; i++)
45 | {
46 | int width = random.Next(200, 400);
47 | int height = random.Next(200, 400);
48 | _news.Add(new News
49 | {
50 | NewsId = i,
51 | Title = $"News Title {i}",
52 | Lead = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec purus nec nunc consectetur ultricies. Nullam nec purus nec nunc consectetur ultricies.",
53 | CoverImageUrl = $"https://picsum.photos/{width}/{height}",
54 | Date = DateTime.Now,
55 | Url = "https://www.example.com"
56 | });
57 | }
58 | }
59 |
60 | private class News
61 | {
62 | public int NewsId { get; set; }
63 | public string Title { get; set; } = string.Empty;
64 | public string Lead { get; set; } = string.Empty;
65 | public string CoverImageUrl { get; set; } = string.Empty;
66 | public DateTime Date { get; set; } = DateTime.Now;
67 | public string Url { get; set; } = string.Empty;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/samples/BasicSample/Components/Layout/NavMenu.razor.css:
--------------------------------------------------------------------------------
1 | .navbar-toggler {
2 | appearance: none;
3 | cursor: pointer;
4 | width: 3.5rem;
5 | height: 2.5rem;
6 | color: white;
7 | position: absolute;
8 | top: 0.5rem;
9 | right: 1rem;
10 | border: 1px solid rgba(255, 255, 255, 0.1);
11 | background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
12 | }
13 |
14 | .navbar-toggler:checked {
15 | background-color: rgba(255, 255, 255, 0.5);
16 | }
17 |
18 | .top-row {
19 | min-height: 3.5rem;
20 | background-color: rgba(0,0,0,0.4);
21 | }
22 |
23 | .navbar-brand {
24 | font-size: 1.1rem;
25 | }
26 |
27 | .bi {
28 | display: inline-block;
29 | position: relative;
30 | width: 1.25rem;
31 | height: 1.25rem;
32 | margin-right: 0.75rem;
33 | top: -1px;
34 | background-size: cover;
35 | }
36 |
37 | .bi-house-door-fill-nav-menu {
38 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
39 | }
40 |
41 | .bi-plus-square-fill-nav-menu {
42 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
43 | }
44 |
45 | .bi-list-nested-nav-menu {
46 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
47 | }
48 |
49 | .nav-item {
50 | font-size: 0.9rem;
51 | padding-bottom: 0.5rem;
52 | }
53 |
54 | .nav-item:first-of-type {
55 | padding-top: 1rem;
56 | }
57 |
58 | .nav-item:last-of-type {
59 | padding-bottom: 1rem;
60 | }
61 |
62 | .nav-item ::deep .nav-link {
63 | color: #d7d7d7;
64 | background: none;
65 | border: none;
66 | border-radius: 4px;
67 | height: 3rem;
68 | display: flex;
69 | align-items: center;
70 | line-height: 3rem;
71 | width: 100%;
72 | }
73 |
74 | .nav-item ::deep a.active {
75 | background-color: rgba(255,255,255,0.37);
76 | color: white;
77 | }
78 |
79 | .nav-item ::deep .nav-link:hover {
80 | background-color: rgba(255,255,255,0.1);
81 | color: white;
82 | }
83 |
84 | .nav-scrollable {
85 | display: none;
86 | }
87 |
88 | .navbar-toggler:checked ~ .nav-scrollable {
89 | display: block;
90 | }
91 |
92 | @media (min-width: 641px) {
93 | .navbar-toggler {
94 | display: none;
95 | }
96 |
97 | .nav-scrollable {
98 | /* Never collapse the sidebar for wide screens */
99 | display: block;
100 |
101 | /* Allow sidebar to scroll for tall menus */
102 | height: calc(100vh - 3.5rem);
103 | overflow-y: auto;
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/samples/BasicSample/wwwroot/app.css:
--------------------------------------------------------------------------------
1 | html, body {
2 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3 | }
4 |
5 | a, .btn-link {
6 | color: #006bb7;
7 | }
8 |
9 | .btn-primary {
10 | color: #fff;
11 | background-color: #1b6ec2;
12 | border-color: #1861ac;
13 | }
14 |
15 | .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
16 | box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
17 | }
18 |
19 | .content {
20 | padding-top: 1.1rem;
21 | }
22 |
23 | h1:focus {
24 | outline: none;
25 | }
26 |
27 | .valid.modified:not([type=checkbox]) {
28 | outline: 1px solid #26b050;
29 | }
30 |
31 | .invalid {
32 | outline: 1px solid #e50000;
33 | }
34 |
35 | .validation-message {
36 | color: #e50000;
37 | }
38 |
39 | .blazor-error-boundary {
40 | background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
41 | padding: 1rem 1rem 1rem 3.7rem;
42 | color: white;
43 | }
44 |
45 | .blazor-error-boundary::after {
46 | content: "An error has occurred."
47 | }
48 |
49 | .darker-border-checkbox.form-check-input {
50 | border-color: #929292;
51 | }
52 |
53 | .form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
54 | color: var(--bs-secondary-color);
55 | text-align: end;
56 | }
57 |
58 | .form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
59 | text-align: start;
60 | }
61 |
62 | /*--------------------------------------------------------------
63 | # Countdown
64 | --------------------------------------------------------------*/
65 |
66 | .countdown {
67 | width: 100%;
68 | text-align: center;
69 | }
70 |
71 | .countdown .enddate {
72 | visibility: hidden;
73 | }
74 |
75 | .countdown .interval {
76 | display: inline-block;
77 | text-align: center;
78 | margin: 20px;
79 | }
80 |
81 | .countdown .timer {
82 | font: 72px Courier;
83 | display: block;
84 | }
85 |
86 | .countdown .measure {
87 | font: 36px Courier;
88 | }
89 |
90 | /*--------------------------------------------------------------
91 | # Animate
92 | --------------------------------------------------------------*/
93 |
94 | .animate {
95 | padding-top: 75px;
96 | padding-bottom: 75px;
97 | }
98 |
99 |
--------------------------------------------------------------------------------
/src/wwwroot/BlazorScriptReload.lib.module.js:
--------------------------------------------------------------------------------
1 | /*
2 | Blazor Script Reload
3 | Copyright (c) 2024-2025
4 | by Shaun Walker of Devessence Inc. (https://devessence.com)
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 | */
24 |
25 | let scriptReloadEnabled = false;
26 | const scriptKeys = new Set();
27 |
28 | export function afterWebStarted(blazor) {
29 | // define custom element
30 | customElements.define('script-reload', class extends HTMLElement {
31 | connectedCallback() {
32 | processScripts(false);
33 | scriptReloadEnabled = true;
34 | }
35 | disconnectedCallback() {
36 | scriptReloadEnabled = false;
37 | }
38 | });
39 | // listen for enhanced navigation (note that 'enhancednavigationend' is a new event in .NET 9 which is a better option)
40 | blazor.addEventListener('enhancedload', onEnhancedLoad);
41 | }
42 |
43 | function onEnhancedLoad() {
44 | if (scriptReloadEnabled) {
45 | processScripts(true);
46 | }
47 | }
48 |
49 | function processScripts(enhancedNavigation) {
50 | // iterate over all script elements in document
51 | const scripts = document.getElementsByTagName('script');
52 | for (const script of Array.from(scripts)) {
53 | // only process scripts that include a data-reload attribute
54 | if (script.hasAttribute('data-reload')) {
55 | let key = getKey(script);
56 |
57 | // on enhanced navigations
58 | if (enhancedNavigation) {
59 | // reload the script if data-reload is "always" or "true"... or if the script has not been loaded previously and data-reload is "once"
60 | let dataReload = script.getAttribute('data-reload');
61 | if ((dataReload === 'always' || dataReload === 'true') || (!scriptKeys.has(key) && dataReload == 'once')) {
62 | reloadScript(script);
63 | }
64 | }
65 |
66 | // save the script key
67 | if (!scriptKeys.has(key)) {
68 | scriptKeys.add(key);
69 | }
70 | }
71 | }
72 | }
73 |
74 | function getKey(script) {
75 | if (script.src) {
76 | return script.src;
77 | } else if (script.id) {
78 | return script.id;
79 | } else {
80 | return script.innerHTML;
81 | }
82 | }
83 |
84 | function reloadScript(script) {
85 | try {
86 | if (isValid(script)) {
87 | injectScript(script);
88 | }
89 | } catch (error) {
90 | console.error(`Blazor Script Reload failed to load script: ${getKey(script)}`, error);
91 | }
92 | }
93 |
94 | function isValid(script) {
95 | if (script.innerHTML.includes('document.write(')) {
96 | console.log(`Blazor Script Reload does not support scripts using document.write(): ${script.innerHTML}`);
97 | return false;
98 | }
99 | return true;
100 | }
101 |
102 | function injectScript(script) {
103 | return new Promise((resolve, reject) => {
104 | var newScript = document.createElement('script');
105 |
106 | // replicate attributes and content
107 | for (let i = 0; i < script.attributes.length; i++) {
108 | if (script.attributes[i].name !== 'data-reload') {
109 | newScript.setAttribute(script.attributes[i].name, script.attributes[i].value);
110 | }
111 | }
112 | newScript.nonce = script.nonce; // must be referenced explicitly
113 | newScript.innerHTML = script.innerHTML;
114 |
115 | // dynamically injected scripts cannot be async or deferred
116 | newScript.async = false;
117 | newScript.defer = false;
118 |
119 | newScript.onload = () => resolve();
120 | newScript.onerror = (error) => reject(error);
121 |
122 | // inject script element in head to force execution in Blazor
123 | document.head.appendChild(newScript);
124 |
125 | // remove data-reload attribute
126 | script.removeAttribute('data-reload');
127 | });
128 | }
129 |
130 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Blazor Script Reload
2 |
3 | 
4 |
5 | Blazor Web Applications (ie. Static Server-Side Blazor using Enhanced Navigation) only process ```
48 |
49 |