v3.6.2 to v3.7.0
AUTOMATIC MIGRATION
-
install node.js (16.16.0)
-
Use the BIAToolKit to migrate the project
-
Manage the conflict (2 solutions)
- In BIAToolKit click on "4 - merge Rejected" and search
<<<<<
in all files.
- Resolve the conflict manually.
- Analyze the .rej file (search "diff a/" in VS code) that have been created in your project folder
- Apply manually the change.
- In BIAToolKit click on "4 - merge Rejected" and search
-
Change source path and run the script V3.6.2_to_V3.7.0_Replacement.ps1
-
Apply other manual step (describe bellow) at the end if all is ok, you can remove the .rej files (during the process they can be useful to resolve build problem)
MANUAL STEPS
FRONT
1. For screens that use views
-
In index.component.html, in bia-table-controller, add tableState param.
<bia-table-controller
...
[tableState]="tableState"
></bia-table-controller> -
In index.component.html, in bia-table, add sortFieldValue and stateSave params
<bia-table
...
[sortFieldValue]="sortFieldValue"
(stateSave)="onStateSave($event)"
></bia-table> -
In index.component.ts, add the following member variables (above the constructor) and filled in the value of sortFieldValue
tableState: string;
sortFieldValue = 'the name of the column sorted by default';
2. Migration Angular 13
-
Migration Angular 13 : original command is
ng update @angular/core@13 @angular/cli@13 --force
ng update @angular-eslint/schematics@13
but it will be applied by the automatic migration so normally you do not have to apply itJust verify that '.gitignore' include '.angular/cache'.
-
Migration PrimeNg 13 : The original command is
ng update primeng@13
but it will be applied by the automatic migration so normally you do not have to apply itsome prime ng icons name change:
- pi-star-o => pi-star (will be automatically change in bia component)
- pi-star => pi-star-fill (will be automatically change in bia component)
- pi-circle-off => pi-circle
- pi-circle-on => pi-circle-fill
If you use it (except in bia template page = bia appear in path of the file) rename them.
4. Other
-
If you have a component that inherits from the bia-table-controller.component.html component, replace your html with that of the bia-table-controller.component.html component, then reapply your specific changes.
-
PrimeNg component are disable by default.
- If you use some primeNg component not used in BIADemo you should apply one of this correctif:
- Uncomment the import and listing in const PRIMENG_MODULES of file
\Angular\src\app\shared\bia-shared\bia-shared.module.ts
- Import it in the module(s) where you need to use it (this solution make faster application for first load).
- Uncomment the import and listing in const PRIMENG_MODULES of file
- If you use some primeNg component not used in BIADemo you should apply one of this correctif:
-
Bia-table-config => bia-field-config
- Replace components/table/bia-table/bia-table-config by model/bia-field-config
- Replace BiaListConfig by BiaFieldsConfig
- Replace PrimeTableColumn by BiaFieldConfig
-
In initTableConfiguration function of the CRUD index
- Add "isRequired: true" in BiaFieldConfig when field is required (information can be see in initForm() of your-feature-table/your-feature-table.component.ts with "Validators.required").
- Comment/remove the subscribe and the change of date format.
private initTableConfiguration() {
=> //this.sub.add(this.biaTranslationService.currentCultureDateFormat$.subscribe((dateFormat) => {
this.tableConfiguration = {
columns: [
Object.assign(new BiaFieldConfig('msn', 'plane.msn'), {
=> isRequired: true,
}),
Object.assign(new BiaFieldConfig('isActive', 'plane.isActive'), {
isSearchable: false,
isSortable: false,
type: PropType.Boolean
}),
Object.assign(new BiaFieldConfig('lastFlightDate', 'plane.lastFlightDate'), {
type: PropType.DateTime,
=> //formatDate: dateFormat.dateTimeFormat
}),
Object.assign(new BiaFieldConfig('deliveryDate', 'plane.deliveryDate'), {
type: PropType.Date,
=> //formatDate: dateFormat.dateFormat
}),
Object.assign(new BiaFieldConfig('syncTime', 'plane.syncTime'), {
type: PropType.TimeSecOnly,
=> //formatDate: dateFormat.timeFormatSec
}),
Object.assign(new BiaFieldConfig('capacity', 'plane.capacity'), {
type: PropType.Number,
filterMode: PrimeNGFiltering.Equals,
=> isRequired: true,
}),
Object.assign(new BiaFieldConfig('planeType', 'plane.planeType'), {
type: PropType.OneToMany
}),
Object.assign(new BiaFieldConfig('connectingAirports', 'plane.connectingAirports'), {
type: PropType.ManyToMany
})
]
};
this.columns = this.tableConfiguration.columns.map((col) => <KeyValuePair>{ key: col.field, value: col.header });
this.displayedColumns = [...this.columns];
=> //}));
}
BACK
-
Modified your DtoToRecord methods (use for CSV extract) of the Mapper classes in the Domain layer by following the example in the BIADemo project: TheBIADevCompany.BIADemo.Domain.PlaneModule.Aggregate.PlaneMapper
-
Move all your WorkerService jobs in application layer :
- Cut all classes in ...WorkerService\Job
- Paste them in ...Application\Job
- modify the namespace => replace
WorkerService.Job
byApplication.Job
- the class should be public (change it if there are private or internal).
- resolve using in ...WorkerService\Worker.cs
-
Move the recurring jobs init in DeployDB
-
Search
RecurringJob.AddOrUpdate
in ...WorkerService\Worker.cs -
Move this code after
RecurringJob.AddOrUpdate<SynchronizeUserTask>
of ...DeployDB\Program.cs -
Copy the "Tasks" settings from ...WorkerService\appsettings.json to ...DeployDB\appsettings.json
-
In ...WorkerService\appsettings.json the "CRON" values can be remove ex:
"Tasks": {
"WakeUp": {
"Url": "http://localhost/BIADemo/App|http://localhost/BIADemo/WebApi/api/Auth/frontEndVersion"
},
}, -
In ...DeployDB\appsettings.json only the "CRON" values should be keep:
"Tasks": {
"WakeUp": {
"CRON": "0 6-17 * * *"
},
"SynchronizeUser": {
"CRON": "0 6 * * *"
}
},
-
BUILD
- Due to .Net 6.0 you should change the build task to use Visual Studio 2022:
- Add a Task "Visual Studio build (Side-by-side)" and set the same parameter than the "Build solution" Task.
- Remove the old Task "Build solution"
- Adapt the copy path
- In the 3 copy tasks replace net5.0 by net6.0
- In the "Copy Files Worker service" change the Contents by ** and the Target Folder by $(build.artifactstagingdirectory)/$(CompanyName).$(ProjectName).WorkerService
DEPLOY
- The service worker should be deploy as a windows service and not more as web Application:
- In all environment, change the version of the task "Deploy Service as Web" used the V4 (BIA Deploy Service - V3.7.0 - *) and rename the task "Deploy Service"