Color scheme: Light
You are here: start » en » Documentation » Microsoft Access development tools » WKL Office SDK » WKL Office SDK how-to guides » How to: Migrate a project of the build tool of WKL Forms Object Library

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.jsonNew project
name, accdeAssemblyName, 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, ribbonscopied 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 iconcopied into their default locations
templatealready 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
finishFinish
controlBlocksControlBlocks
deploy, outputnot 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. migrate with -o keeps the reference of the old project, also one to release 1.x (WklComponents). On a PC with release 2.0 registered, build then 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 with wkl-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; migrate cannot know where that was. It names the folder control-blocks or docs/control-blocks two folders above access-app.json when 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 as ControlBlocks or in the environment variable WKL_ACCESS_CONTROL_BLOCKS.
  • Delivery. The deploy targets of the old tool have no counterpart in the SDK; a configuration with Accde and AppMode makes the ACCDE with the startup properties of a mode, and WKL Bootstrapper delivers it. wkl-office deliver writes the delivery with its app-manifest.json (format 1, as WKL Bootstrapper reads it) from delivery\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: true in their schema: the tables the old tool made with CREATE TABLE accepted "", and a field built without it refuses it with error 3315 (see “Fields of a table schema” in the source layout).
en/wiki/msaccess/sdk/how-to/migrate-from-the-build-tool.txt · Last modified: by Wolfgang van der Stille