docs/en/release-info/migration-guides/abp-4-0-blazor.md
//[doc-seo]
{
"Description": "Explore the Blazor UI 3.3 to 4.0 Migration Guide, detailing essential updates for your project files and dependencies to ensure a smooth transition."
}
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.
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData> to the PropertyGroup section of your project (.csproj) file.Blazorise.* packages to the latest version (to the latest RC for the ABP 4.0 preview).wwwroot/index.htmlThere are some changes made in the index.html file;
abp bundle CLI command to manage global Style/Script file imports.Follow the steps below to apply the changes;
using Volo.Abp.Bundling;
namespace MyCompanyName.MyProjectName.Blazor
{
public class MyProjectNameBundleContributor : IBundleContributor
{
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.
<link...> elements and replace with the following comment tags:<!--ABP:Styles-->
<!--/ABP:Styles-->
<script...> elements and replace with the following comment tags:<!--ABP:Scripts-->
<!--/ABP:Scripts-->
.csproj) file (ensure that you're using the ABP CLI version 4.0):abp bundle
This will fill in the Styles and Scripts tags based on the dependencies.
blazor-error-ui related sections from your main.css file since they are not needed anymore.This change is optional but recommended.
<app>...</app> to <div id="ApplicationContainer">...</div> in the wwwroot/index.html.builder.RootComponents.Add<App>("app"); to builder.RootComponents.Add<App>("#ApplicationContainer"); in the YourProjectBlazorModule.cs.If you've derived your pages from the AbpCrudPageBase class, then you may need to apply the following changes;
OpenEditModalAsync method gets EntityDto instead of id (Guid) parameter. Pass context instead of context.Id.DeleteEntityAsync method doesn't display confirmation dialog anymore. You can use the new EntityActions component in Data Grids to show confirmation messages. You can also inject IUiMessageService to your page or component and call the ConfirmAsync explicitly.GetListInput as a base property that is used to filter while getting the entities from the server.