7/5/2020 Administrator

Upgrading Blazor Blogs


Notice: Before upgrading back up the database and file system.

You can upgrade an existing Blazor Blogs site using the upgrade package.

image

You can find the most recent _UpgradePackage on the Releases page:

https://github.com/ADefWebserver/Blazor-Blogs/releases

Click on the .zip file and download it to your local computer.

image

Log into your Blazor Blogs site as the Administrator.


image

Navigate to the Settings page and click the Upload Upgrade Package button.


image

Select the _Upgrade .zip file you downloaded.


image

The file will be uploaded and processed.


image

When prompted, click the button to restart the site.


image

You will be presented with another link to click to continue the upgrade process.


image

The site will then become unavailable.

(This is required to load the new code)


image

Wait 45 seconds then refresh the site in your web browser.


image

The site will detect that there are upgrade scripts to process and it will process them.


image

When the processing is complete, you will be presented with a button to click to continue.


image

You can confirm that the upgrade was successful by checking the updated version number in the Settings.


To Create an Upgrade Package

You can create an upgrade package, to deploy your own customizations, using the following steps:

In BlazorBlogsLibrary\Pages\_Host.cshtml, update the revised tag to the current date:

image

In BlazorBlogsLibrary\Pages\Shared\MainLayout.razor, update the current version number that triggers the installer:

image

Add a .sql script for the current version that runs any required .sql scripts and increases the version number like this:

image

Add the Script to BlazorBlogsLibrary\Pages\InstallUpgrade\InstallWizardExecuteScripts.razor:

image

Update the manifest.json file:

image

Build the project (do a re-build in Visual Studio, not just a build to properly move the .dlls to the Blazor-Blogs\BlazorBlogs\CustomModules folder in the main project).

Copy the .dlls from the CustomModules folder, and put the .dlls (BlazorBlogsLibrary.dll and BlazorBlogsLibrary.Views.dll) in a Upgrade folder and then zip up everything with the folder paths like this:

image

The .zip package can now be used to upgrade a deployed site.

An error has occurred. This application may no longer respond until reloaded. Reload 🗙