VCP 4.x to 4.3 Migration Guide
This version comes with some changes in the startup template, mostly related to Blazor UI. This document explains the breaking changes. However, it is suggested to compare the startup templates manually to see all the changes and apply to your solution.
Open-Source (Framework)
If you are using one of the open-source startup templates, then you can check the following sections to apply the related breaking changes:
UseVirtualFiles Has Been Marked as Obsolete
app.UseVirtualFiles()has been marked as obsolete. Useapp.UseStaticFiles()instead. VCP will handle the virtual file system integrated to the static files middleware.
Blazor UI
Implemented the Blazor Server Side support with this release. It required some packages and namespaces arrangements. Existing Blazor (WebAssembly) applications should done the changes explained in this section.
Namespace Changes
VcpBlazorMessageLocalizerHelper-> moved to Verto.Vcp.AspNetCore.Components.WebVcpRouterOptions-> moved to Verto.Vcp.AspNetCore.Components.Web.Theming.RoutingVcpToolbarOptionsandIToolbarContributor-> moved to Verto.Vcp.AspNetCore.Components.Web.Theming.ToolbarsIVcpUtilsService-> moved to Verto.Vcp.AspNetCore.Components.WebPageHeader-> moved toVerto.Vcp.AspNetCore.Components.Web.Theming.Layout.
In practice, if your application is broken because of the Verto.Vcp.AspNetCore.Components.WebAssembly.* namespace, please try to switch to Verto.Vcp.AspNetCore.Components.Web.* namespace.
Remember to change namespaces in the _Imports.razor files.
Package Changes
No change on the framework packages, but module packages are separated as Web Assembly & Server;
- Use
Verto.Vcp.Identity.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.Identity.Blazorpackage. Also, changeVcpIdentityBlazorModuleusage toVcpIdentityBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Use
Verto.Vcp.TenantManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.TenantManagement.Blazorpackage. Also, changeVcpTenantManagementBlazorModuleusage toVcpTenantManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Use
Verto.Vcp.PermissionManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.PermissionManagement.Blazorpackage. Also, changeVcpPermissionManagementBlazorModuleusage toVcpPermissionManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Use
Verto.Vcp.SettingManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.SettingManagement.Blazorpackage. Also, changeVcpSettingManagementBlazorModuleusage toVcpSettingManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Use
Verto.Vcp.FeatureManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.FeatureManagement.Blazorpackage. Also, changeVcpFeatureManagementBlazorModuleusage toVcpFeatureManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class.
Other Changes
EntityAction.RequiredPermissionhas been marked as obsolete, because of performance reasons. It is suggested to use theVisibleproperty by checking the permission/policy yourself and assigning to a variable.
Resource Reference Changes
Open <YourProjectName>BundleContributor.cs and replace context.Add("main.css"); to context.Add("main.css", true);
Then run vcp bundle command in the blazor folder to update resource references.
PRO
Please check the Open-Source (Framework) section before reading this section. The listed topics might affect your application and you might need to take care of them.
If you are a paid-license owner and using the VCP's paid version, then please follow the following sections to get informed about the breaking changes and apply the necessary ones:
Identity Pro Module
With this release, we've published new packages for the Identity.Pro module. These packages extend the open source Identity module and will provide flexibility to us for adding unique features to the Identity Pro module.
Existing applications should replace some usages as described below.
Package Changes
- Replace
Verto.Vcp.Identity.Domainwith the newVerto.Vcp.Identity.Pro.Domainpackage and also replaceVcpIdentityDomainModuleusage withVcpIdentityProDomainModulein your module's[DependsOn]attribute. - Replace
Verto.Vcp.Identity.Domain.Sharedwith the newVerto.Vcp.Identity.Pro.Domain.Sharedpackage and also replaceVcpIdentityDomainSharedModuleusage withVcpIdentityProDomainSharedModulein your module's[DependsOn]attribute. - If you are using EF Core, Replace
Verto.Vcp.Identity.EntityFrameworkCorewith the newVerto.Vcp.Identity.Pro.EntityFrameworkCorepackage and also replaceVcpIdentityEntityFrameworkCoreModuleusage withVcpIdentityProEntityFrameworkCoreModulein your module's[DependsOn]attribute. - If you are using MongoDB, Replace
Verto.Vcp.Identity.MongoDBwith the newVerto.Vcp.Identity.Pro.MongoDBpackage and also replaceVcpIdentityMongoDbModuleusage withVcpIdentityProMongoDbModulein your module's[DependsOn]attribute.
Other Changes
- Find
modelBuilder.ConfigureIdentity()and change bymodelBuilder.ConfigureIdentityPro()in your EF Core project. - If you've used
IdentityDbContext, useIdentityProDbContextinstead.
Blazor UI
Blazor server support comes with this release and we've created separate WebAssembly and Server packages for the modules.
So, if you are using Blazor WebAssembly UI, please make the following changes in your Blazor project;
- Identity Module: Use
Verto.Vcp.Identity.Pro.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.Identity.Pro.Blazorpackage. Also, changeVcpIdentityProBlazorModuleusage toVcpIdentityProBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Audit Logging Module: Use
Verto.Vcp.AuditLogging.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.AuditLogging.Blazorpackage. Also, changeVcpAuditLoggingBlazorModuleusage toVcpAuditLoggingBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Text Template Management Module: Use
Verto.Vcp.TextTemplateManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.TextTemplateManagement.Blazorpackage. Also, changeTextTemplateManagementBlazorModuleusage toTextTemplateManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Identity Server Module: Use
Verto.Vcp.IdentityServer.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.IdentityServer.Blazorpackage. Also, changeVcpIdentityServerBlazorModuleusage toVcpIdentityServerBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - Language Management Module: Use
Verto.Vcp.LanguageManagement.Blazor.WebAssemblyNuGet package instead ofVerto.Vcp.LanguageManagement.Blazorpackage. Also, changeLanguageManagementBlazorModuleusage toLanguageManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - SaaS Module (host): Use
Verto.Saas.Host.Blazor.WebAssemblyNuGet package instead ofVerto.Saas.Host.Blazorpackage. Also, changeSaasHostBlazorModuleusage toSaasHostBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - SaaS Module (tenant): Use
Verto.Saas.Tenant.Blazor.WebAssemblyNuGet package instead ofVerto.Saas.Tenant.Blazorpackage. Also, changeSaasTenantBlazorModuleusage toSaasTenantBlazorWebAssemblyModulein the[DependsOn]attribute on your module class. - File Management Module: Use
Verto.FileManagement.Blazor.WebAssemblyNuGet package instead ofVerto.FileManagement.Blazorpackage. Also, changeFileManagementBlazorModuleusage toFileManagementBlazorWebAssemblyModulein the[DependsOn]attribute on your module class.
Resource Reference Changes
Open <YourProjectName>BundleContributor.cs and replace context.Add("main.css"); to context.Add("main.css", true);
Open appsettings.json and add the following:
"VcpCli": {
"Bundle": {
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
"Name": "global",
"Parameters": {
"FermionTheme.Style": "Style6", /* Options: Style1, Style2... Style6 */
"FermionTheme.ChangeStyleDynamically": "true"
}
}
}
Then run vcp bundle command in the blazor folder to update resource references.
Angular UI
- AccountConfigModule:
AccountConfigModulehas been deprecated. It will be removed in v5.0. ImportAccountAdminConfigModuleinstead as shown below:
// app.module.ts
import { AccountAdminConfigModule } from '@verto/vcp.ng.account/admin/config';
@NgModule({
//...
imports: [
//...
AccountAdminConfigModule.forRoot(),
//...
]
})
export class AppModule {}
- CommercialUiConfigModule:
CommercialUiConfigModulehas been created to makeCommercialUIModulelazy-loadable. The module will also provide some benefits for the configuration. Import it to theapp.module.tsas shown below:
import { CommercialUiConfigModule } from '@verto/vcp.commercial.ng.ui/config';
@NgModule({
//...
imports: [
//...
CommercialUiConfigModule.forRoot(),
//...other vcp config modules
]
})
export class AppModule {}