7/5/2020 Administrator
Upgrading Blazor Blogs
- Notice: If you need to upgrade Blazor-Blogs from any version that begins with 1.0 to a version of Blazor-Blogs that begins with 2.0, you must use the directions at: Upgrading Blazor Blogs (Version 1.0 to Version 2.0) rather than the usual upgrade instructions covered here.
- 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:
https://github.com/ADefWebserver/Blazor-Blogs/releases
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.