How to: Migrate a project of the build tool of WKL Forms Object Library
Move an application built with Build-AccessApp.ps1 and access-app.json (the build tool of WKL Forms Object Library)
to the WKL Office SDK, so it builds with wkl-office and dotnet build and keeps Access and the sources in step.
Solution overview
wkl-office migrate access-app.json -o <folder> writes a new project; the old one is only read.
access-app.json | New project |
|---|---|
name, accde | AssemblyName, Accde |
references (WklComponents, WklJSON and others by GUID) | source/references.json, after OLE Automation and DAO, which every new database has and the old tool kept |
| database properties (Yes/No, Long, text) | source/application/properties.json |
table scripts (*.sql) | run in a scratch database and read back: tables/, relations/, and the rows the scripts insert as seed data |
| modules, classes, forms, reports, queries, macros, ribbons | copied into the same folders, relative to the new project file; source items name these folders (AccessModule, AccessForm …; see Project file: Source items). A folder outside the folder of access-app.json goes to the default location, and a folder that already is the default location needs no item. |
| theme, models with icon | copied into their default locations |
template | already an SDK project (a folder with one .acproj): named as Template without a copy, by its name when found below WKL_ACCESS_TEMPLATES, otherwise by its relative path; only in the old format: migrated into the folder template of the new project and named as Template; not found: named as Template by its name, with a note, so the build stops until WKL_ACCESS_TEMPLATES names its folder |
finish | Finish |
controlBlocks | ControlBlocks |
deploy, output | not taken over (note printed): delivery is the job of WKL Bootstrapper |
Implementation
wkl-office migrate C:\Old\Customers\access-app.json -o C:\Work\Customers cd C:\Work\Customers wkl-office build Customers.acproj wkl-office export Customers.acproj wkl-office roundtrip Customers.acproj
Export once after the first build and commit the result: Access writes forms and modules once in its own way. From
then on roundtrip exits with 0.
Remarks
- WKL Forms Object Library 2.0.
migratewith-okeeps the reference of the old project, also one to release 1.x (WklComponents). On a PC with release 2.0 registered,buildthen stops because the type library isn't registered in the version the reference asks for. In that case, first move the new project to release 2.0 in place withwkl-office migrate Customers.acproj(without-o); see `migrate`. - Placeholders. Forms with placeholder rectangles (Tag
wkl:<Kind>) need the control blocks of WKL Forms Object Library. The old tool took them from next to itself;migratecannot know where that was. It names the foldercontrol-blocksordocs/control-blockstwo folders aboveaccess-app.jsonwhen there is one (so for the templates in the release package and the repository of WKL Forms Object Library); otherwise it prints a note. Then name the folder of the release package asControlBlocksor in the environment variableWKL_ACCESS_CONTROL_BLOCKS. - Delivery. The
deploytargets of the old tool have no counterpart in the SDK; a configuration withAccdeandAppModemakes the ACCDE with the startup properties of a mode, and WKL Bootstrapper delivers it.wkl-office deliverwrites the delivery with itsapp-manifest.json(format 1, as WKL Bootstrapper reads it) fromdelivery\delivery-settings.json: see Deliver an application from the SDK. An application that wrote its manifest itself after the build can drop that step. - Empty texts. The text fields of the migrated tables get
allowZeroLength: truein their schema: the tables the old tool made withCREATE TABLEaccepted"", and a field built without it refuses it with error 3315 (see „Fields of a table schema“ in the source layout).
Related topics
en/wiki/msaccess/sdk/how-to/migrate-from-the-build-tool.txt · Zuletzt geändert: von Wolfgang van der Stille