How do I create or fix layout.json for an MSFS add-on?
To create or fix a layout.json file for a Microsoft Flight Simulator add-on, regenerate it from the package root so every file has the correct relative path, byte size and Windows file timestamp. Keep it beside manifest.json; do not copy one from another package or edit entries by guesswork.
What does layout.json do in Microsoft Flight Simulator?
layout.json is the package inventory Microsoft Flight Simulator uses when mounting an add-on. A generated layout normally includes manifest.json and every intended payload file, but it must exclude layout.json itself.
Each entry contains three key values:
- path: the exact path relative to the package root, using forward slashes and no drive letter or leading slash.
- size: the file size in bytes, stored as a number.
- date: the file's last-write time represented as a Windows FILETIME number, not a readable date string.
A file can be valid JSON yet still be wrong for the package. Stale sizes, timestamps or paths can stop modified content from loading, while regenerating the layout cannot restore payload files that are genuinely missing.
How do I regenerate layout.json safely?
The right repair method depends on where the package came from.
| Method | Use it when | What it does |
|---|---|---|
| Fresh extraction | An unchanged downloaded add-on arrived without a working layout | Restores the author's layout and any files lost during extraction |
| SDK package build | You own the add-on's source project | Builds the output package and generates its layout through the SDK |
| PowerShell scan | You intentionally changed an ordinary unpacked PC package | Rebuilds the inventory from the files already present |
Do not regenerate protected official or Marketplace packages. Repair or reinstall those through the simulator's content-management system. Manual Community-folder repairs apply to PC installations; console editions do not expose an equivalent package root.
Regenerate an unpacked package with PowerShell
This PowerShell method creates a clean UTF-8 layout without a byte-order mark and records the required relative paths, sizes and timestamps.
Close Microsoft Flight Simulator. Copy the original package somewhere outside its package folder. A backup left inside the folder would itself be added to the new layout.
Find the actual package root. It is the folder containing
manifest.jsonand content directories such asSimObjects,sceneryorContentInfo. Do not scan the wholeCommunityfolder. If an extra wrapper folder is present, our package-root walkthrough shows how to correct double-nested add-ons.Open PowerShell and run these lines in order. Replace the sample path with the package root:
$root = (Resolve-Path 'C:\MSFS-Packages\my-package').Path.TrimEnd([char]92)$layoutPath = Join-Path $root 'layout.json'$content = @(Get-ChildItem -LiteralPath $root -File -Recurse -Force | Where-Object { $_.FullName -ne $layoutPath } | Sort-Object FullName | ForEach-Object { $relative = $_.FullName.Substring($root.Length).TrimStart([char]92).Replace([char]92,[char]47); [ordered]@{ path = $relative; size = [long]$_.Length; date = [long]($_.LastWriteTimeUtc.ToFileTimeUtc()) } })$json = [ordered]@{ content = $content } | ConvertTo-Json -Depth 4$utf8 = New-Object System.Text.UTF8Encoding($false)[System.IO.File]::WriteAllText($layoutPath, $json, $utf8)Inspect the result. The file should contain one top-level
contentarray. Paths must not containC:\, the package's top-level folder name or backslashes. There should be no comments or trailing commas.Start the simulator and test the add-on. If it still fails, the cause is probably package placement,
manifest.json, a dependency, a conflict or simulator compatibility rather than the regenerated layout.
The script inventories every file under the selected root. Remove development files, archives and backups that are not meant to ship before running it. For an add-on you are developing, the SDK package builder is preferable because it builds only the files defined by the project.
Why does the add-on still not appear after fixing layout.json?
A correct layout cannot compensate for an incorrectly installed or incompatible package. Check these failure points next:
- Wrong Community folder: separate simulator installations or versions can use different active package locations.
- Extra folder level:
manifest.jsonandlayout.jsonare buried below an unnecessary wrapper directory. - Broken symbolic link: when using linked packages, our Addons Linker troubleshooting explains how to verify the source and Community targets.
- Invalid manifest: malformed JSON, a duplicate package identity or missing required fields can prevent discovery.
- Version mismatch: MSFS 2020 and MSFS 2024 use similar package layouts, but a valid layout does not make every add-on compatible with both simulators.
- Missing dependency or conflicting package: liveries may require a specific base aircraft, while two packages can try to replace the same virtual files.
If the package is an aircraft, our aircraft visibility checklist covers folder structure, dependencies and version-specific problems beyond layout.json.
Does layout.json need updating after every edit?
Regenerate layout.json whenever you add, delete, rename or modify any packaged file, including manifest.json. Even when an edited texture happens to retain the same byte size, its timestamp has changed and the inventory should be rebuilt.
Moving the complete package to another disk or renaming only its outer package folder does not normally require regeneration because layout paths are relative. Changing anything inside that root does.