MakeCode Project Blocks Description
3.0 | 1 Vote
What is a BLOCKS file?
A main.blocks file is a portion of a Microsoft MakeCode project. It contains XML data that describes the project's code blocks. Main.blocks is one of four primary MakeCode project files.
By default, MakeCode saves users' projects to their web browser's local storage. These project directories contain at least the four following basic project files:
- Main.blocks: Describes the attributes and positions of the project's blocks
- Pxt.json: Contains project dependency information
- README.md: Contains readme information
However, developers who use MakeCode's save to GitHub feature are most likely to encounter these project files. After saving their project to GitHub, developers can examine each of the constituent files the project contains.
Common BLOCKS Filenames
Main.blocks - The name Microsoft MakeCode assigns to BLOCKS files.
How to open a BLOCKS file
You can open and edit a main.blocks file with Microsoft Visual Studio Code (multiplatform) or any other text editor. However, keep in mind that editing a main.blocks file may cause the MakeCode project that uses it to function incorrectly. In most cases, you should open MakeCode projects and edit their code directly in Microsoft MakeCode (Web).