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.
You can find the most recent _UpgradePackage on the Releases page:
Click on the .zip file and download it to your local computer.
Log into your Blazor Blogs site as the Administrator.
Navigate to the Settings page and click the Upload Upgrade Package button.
Select the _Upgrade .zip file you downloaded.
The file will be uploaded and processed.
When prompted, click the button to restart the site.
You will be presented with another link to click to continue the upgrade process.
The site will then become unavailable.
(This is required to load the new code)
Wait 45 seconds then refresh the site in your web browser.
The site will detect that there are upgrade scripts to process and it will process them.
When the processing is complete, you will be presented with a button to click to continue.
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:
In BlazorBlogsLibrary\Pages\Shared\MainLayout.razor, update the current version number that triggers the installer:
Add a .sql script for the current version that runs any required .sql scripts and increases the version number like this:
Add the Script to BlazorBlogsLibrary\Pages\InstallUpgrade\InstallWizardExecuteScripts.razor:
Update the manifest.json file:
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:
The .zip package can now be used to upgrade a deployed site.