diff --git a/aspnetcore/blazor/progressive-web-app.md b/aspnetcore/blazor/progressive-web-app.md index 927745249370..b2b2f2a9eb01 100644 --- a/aspnetcore/blazor/progressive-web-app.md +++ b/aspnetcore/blazor/progressive-web-app.md @@ -90,18 +90,49 @@ To obtain static assets, use **one** of the following approaches: dotnet new blazorwasm -o MyBlazorPwa --pwa -f net5.0 ``` +:::moniker range=">= aspnetcore-8.0" + * Navigate to the ASP.NET Core GitHub repository at the following URL, which links to `main` branch reference source and assets. Select the release that you're working with from the **Switch branches or tags** dropdown list that applies to your app. - [Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `main` branch)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/wwwroot) + [Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `main` branch)](https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/wwwroot) [!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] -From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder: + From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder: -* `icon-512.png` -* `manifest.json` -* `service-worker.js` -* `service-worker.published.js` + * `icon-192.png` + * `icon-512.png` + * `manifest.webmanifest` + * `service-worker.js` + * `service-worker.published.js` + +In the app's `wwwroot/index.html` file: + +* Add `` elements for the manifest and app icon: + + ```html + + + + ``` + +:::moniker-end + +:::moniker range="< aspnetcore-8.0" + +* Navigate to the ASP.NET Core GitHub repository at the following URL, which links to the `release/7.0` branch reference source and assets. If you're using a version of ASP.NET Core later than 7.0, change the document version selector to see the updated guidance for this section. Select the release that you're working with from the **Switch branches or tags** dropdown list that applies to your app. + + [Blazor WebAssembly project template `wwwroot` folder (dotnet/aspnetcore GitHub repository `release/7.0` branch)](https://github.com/dotnet/aspnetcore/tree/release/7.0/src/ProjectTemplates/Web.ProjectTemplates/content/ComponentsWebAssembly-CSharp/Client/wwwroot) + + [!INCLUDE[](~/includes/aspnetcore-repo-ref-source-links.md)] + + From the source `wwwroot` folder either in the app that you created or from the reference assets in the `dotnet/aspnetcore` GitHub repository, copy the following files into the app's `wwwroot` folder: + + * `favicon.png` + * `icon-512.png` + * `manifest.json` + * `service-worker.js` + * `service-worker.published.js` In the app's `wwwroot/index.html` file: @@ -112,6 +143,8 @@ In the app's `wwwroot/index.html` file: ``` +:::moniker-end + * Add the following `