diff --git a/docs/en/Migration-Guides/Abp-4_0-Blazor.md b/docs/en/Migration-Guides/Abp-4_0-Blazor.md index f1d22a8dec..0f01899f7c 100644 --- a/docs/en/Migration-Guides/Abp-4_0-Blazor.md +++ b/docs/en/Migration-Guides/Abp-4_0-Blazor.md @@ -2,6 +2,13 @@ ## Startup Template Changes +These changes are required to manually applied in your own solution. It would be easier if you create a new solution based on 4.0 with the same name of your current solution then compare the files. + +### Csproj File / Dependencies + +* Add `true` to the `PropertyGroup` section of your project (`.csproj`) file. +* Update the `Blazorise.*` packages to the latest version (to the latest RC for the ABP 4.0 preview). + ### wwwroot/index.html There are some changes made in the index.html file; @@ -13,21 +20,44 @@ There are some changes made in the index.html file; Follow the steps below to apply the changes; -1. Remove all the `` elements and replace with the following comment tags: +1. Add the bundle contributor class into your project (it will be slightly different based on your solution namespaces): + +````csharp +using Volo.Abp.Bundling; + +namespace MyCompanyName.MyProjectName.Blazor +{ + public class MyProjectNameBundleContributer : IBundleContributer + { + public void AddScripts(BundleContext context) + { + } + + public void AddStyles(BundleContext context) + { + context.Add("main.css"); + } + } +} +```` + +If you are using another global style/script files, add them here. + +2. Remove all the `` elements and replace with the following comment tags: ````html ```` -2. Remove all the `` elements and replace with the following comment tags: +3. Remove all the `` elements and replace with the following comment tags: ````html ```` -3. Execute the following command in a terminal in the root folder of the Blazor project (`.csproj`) file (ensure that you're using the ABP CLI version 4.0): +4. Execute the following command in a terminal in the root folder of the Blazor project (`.csproj`) file (ensure that you're using the ABP CLI version 4.0): ````bash abp bundle @@ -35,6 +65,8 @@ abp bundle This will fill in the `Styles` and `Scripts` tags based on the dependencies. +5. You can clean the `blazor-error-ui` related sections from your `main.css` file since they are not needed anymore. + ### The Root Element This change is optional but recommended.