From 9bfa52c60f99fdda2e5aca462e49bee4d9e49d85 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Thu, 16 Dec 2021 08:06:45 -0600 Subject: [PATCH] Prior deployment corruption guidance (#24333) --- .../blazor/host-and-deploy/webassembly.md | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/aspnetcore/blazor/host-and-deploy/webassembly.md b/aspnetcore/blazor/host-and-deploy/webassembly.md index da5b2f6acb..4931bbbe64 100644 --- a/aspnetcore/blazor/host-and-deploy/webassembly.md +++ b/aspnetcore/blazor/host-and-deploy/webassembly.md @@ -734,6 +734,17 @@ In the project file, the script is run after publishing the app: > [!NOTE] > When renaming and lazy loading the same assemblies, see the guidance in . +## Prior deployment corruption + +Typically on deployment: + +* Only the files that have changed are replaced, which usually results in a faster deployment. +* Existing files that aren't part of the new deployment are left in place for use by the new deployment. + +In rare cases, lingering files from a prior deployment can corrupt a new deployment. Completely deleting the existing deployment (or locally-published app prior to deployment) may resolve the issue with a corrupted deployment. Often, deleting the existing deployment ***once*** is sufficient to resolve the problem, including for a DevOps build and deploy pipeline. + +If you determine that clearing a prior deployment is always required when a DevOps build and deploy pipeline is in use, you can temporarily add a step to the build pipeline to delete the prior deployment for each new deployment until you troubleshoot the exact cause of the corruption. + ## Resolve integrity check failures When Blazor WebAssembly downloads an app's startup files, it instructs the browser to perform integrity checks on the responses. It uses information in the `blazor.boot.json` file to specify the expected SHA-256 hash values for `.dll`, `.wasm`, and other files. This is beneficial for the following reasons: @@ -1559,6 +1570,17 @@ In the project file, the script is run after publishing the app: > [!NOTE] > When renaming and lazy loading the same assemblies, see the guidance in . +## Prior deployment corruption + +Typically on deployment: + +* Only the files that have changed are replaced, which usually results in a faster deployment. +* Existing files that aren't part of the new deployment are left in place for use by the new deployment. + +In rare cases, lingering files from a prior deployment can corrupt a new deployment. Completely deleting the existing deployment (or locally-published app prior to deployment) may resolve the issue with a corrupted deployment. Often, deleting the existing deployment ***once*** is sufficient to resolve the problem, including for a DevOps build and deploy pipeline. + +If you determine that clearing a prior deployment is always required when a DevOps build and deploy pipeline is in use, you can temporarily add a step to the build pipeline to delete the prior deployment for each new deployment until you troubleshoot the exact cause of the corruption. + ## Resolve integrity check failures When Blazor WebAssembly downloads an app's startup files, it instructs the browser to perform integrity checks on the responses. It uses information in the `blazor.boot.json` file to specify the expected SHA-256 hash values for `.dll`, `.wasm`, and other files. This is beneficial for the following reasons: @@ -2384,6 +2406,17 @@ In the project file, the script is run after publishing the app: > [!NOTE] > When renaming and lazy loading the same assemblies, see the guidance in . +## Prior deployment corruption + +Typically on deployment: + +* Only the files that have changed are replaced, which usually results in a faster deployment. +* Existing files that aren't part of the new deployment are left in place for use by the new deployment. + +In rare cases, lingering files from a prior deployment can corrupt a new deployment. Completely deleting the existing deployment (or locally-published app prior to deployment) may resolve the issue with a corrupted deployment. Often, deleting the existing deployment ***once*** is sufficient to resolve the problem, including for a DevOps build and deploy pipeline. + +If you determine that clearing a prior deployment is always required when a DevOps build and deploy pipeline is in use, you can temporarily add a step to the build pipeline to delete the prior deployment for each new deployment until you troubleshoot the exact cause of the corruption. + ## Resolve integrity check failures When Blazor WebAssembly downloads an app's startup files, it instructs the browser to perform integrity checks on the responses. It uses information in the `blazor.boot.json` file to specify the expected SHA-256 hash values for `.dll`, `.wasm`, and other files. This is beneficial for the following reasons: