Understand the project you are editing
Know which files are authoritative, which are generated, and what must travel with an example.
Choose the project kind#
| Kind | Use it for | Entry / output |
|---|---|---|
| DesktopApp | A Form-based application | Startup Form or Sub Main → desktop application |
| ConsoleApp | A nonvisual program or a language exercise | Main procedure → console program |
| Library | Reusable BASIC functions and classes | Public API → package |
| UserControlLibrary | Reusable visual composition | Public controls → package |
The CLI offers desktop, blank, mdi, control and library templates. An MDI project is a desktop application with a workspace/child-Form relationship, not a different programming language.
Read the file map#
| File | Keep in Git | Why it matters |
|---|---|---|
*.mcbproj/project.mcproj (or legacy *.mcproj) | Yes | Names the code, layouts, migrations, resources, targets and package dependencies. |
Forms/*.form.json | Yes | Stores stable object IDs, parent relationships, initial properties and event bindings. |
*.bas / *.cls | Yes | Contains the authored behavior and reusable types. |
Database/migrations/*.sql | Yes | Defines a reproducible evolution of the application database. |
| Resources and report JSON | Yes | Must be available when the application is built. |
McBasic.lock | Yes, when using packages | Pins the admitted package resolution. |
| Build products, caches, logs | Usually no | Do not use generated files as the place to make a lasting source change. |
A tutorial archive includes the declared files, not your existing database, private settings or credentials. Its manifest is the quickest way to see whether an apparently missing file is actually a dependency.
Keep identity stable#
A Form’s type name appears in BASIC declarations such as Dim details As frmDetails. Its project ID and layout path serve different purposes. A control’s Name is a BASIC symbol, while its ID ties the layout together. Prefer the IDE’s rename operation over a broad text replacement that may change captions or unrelated identifiers.
Add files through the project contract#
Placing a resource or module beside the project is not enough. It must be declared where the toolchain expects it. When adding a Form, keep its code/layout pair together and set the startup Form deliberately. When copying a project, copy its declared dependencies and inspect package references before Check.
Know which build a lesson describes#
Every documentation page names its source build and Git revision. The maintenance manifest records content hashes for the code and metadata behind the examples. For a future update, compare that baseline with the new source, update the affected lesson and rerun its checks; do not simply change the number in the footer.
20f4bfed6b · Build manifest