Editing .pbip Projects in Power BI Desktop, Tabular Editor, and VS Code Without Losing Work

One project. Three tools. Zero lost work. Power BI Desktop, Tabular Editor and VS Code all writing to the same .pbip files

This post was first published on the Microsoft Fabric Community Blog. This version adds a few notes for ExcelFort readers.

Switching from .pbix to Power BI Project (.pbip) files turns your semantic model into TMDL and your report into PBIR: plain text files that Git can diff. That’s the upside. The catch is that three tools can now change the same files: Power BI Desktop, Tabular Editor, and VS Code.

None of them merge each other’s changes. Whichever one saves or reloads last wins. This post covers the routine I use so that never costs me work, for both Tabular Editor 3 and the free Tabular Editor 2.

Key takeaways

  • One writer at a time. Only one tool should write to the project folder at any moment.
  • Connect, don’t open, when Desktop is running. Launch Tabular Editor from External Tools so only Desktop writes to disk.
  • Save, switch, reload. Save before you change tools, then let the other tool reload. Nothing is ever merged.
  • Git is your undo button. Commit before every switch and an accidental overwrite takes seconds to fix.
VS Code Explorer showing a .pbip project with the SemanticModel definition folder and one .tmdl file per table

A .pbip project in VS Code: the .SemanticModel/definition folder holds one .tmdl file per table.

Before you start: check your versions

Some of the sync behaviour below is new, so check these first:

  • Power BI Desktop, August 2026 or later, with File > Options and settings > Options > Preview features > Detect and reload external PBIP changes turned on. Restart Desktop afterwards. Without it, Desktop only picks up file changes after a restart.
  • A recent Tabular Editor 3 build (I tested 3.27.1), for automatic reload when files change on disk.
  • TE3 edition: Desktop Edition only works as an External Tool connected to Power BI Desktop. Opening a model folder needs Business or Enterprise.
Power BI Desktop Options, Preview features page with Detect and reload external PBIP changes ticked

Power BI Desktop: Options > Preview features > “Detect and reload external PBIP changes”.

Recommended Tabular Editor 3 settings

In TE3, go to Tools > Preferences > Tabular Editor > Miscellaneous and leave all four Metadata Synchronization options ticked:

SettingWhy
Warn when local metadata is out-of-sync with deployed modelWarns you before you save over a model that changed somewhere else.
Track external model changesNeeded when TE3 is connected to Desktop. It’s how TE3 notices changes made in Desktop.
Refresh local Tabular Object Model metadata automaticallyUpdates TE3’s view when Desktop changes the model.
Automatically reload from disk (hot reload)For folder mode. Reloads TE3 when the TMDL files change on disk.

1. Give each tool one job

  • Power BI Desktop: report authoring, Power Query, and anything that needs data refreshed.
  • Tabular Editor: model work, such as DAX measures, calculation groups, display folders, relationships, and Best Practice Analyzer checks.
  • VS Code: Git, diffs, and bulk find-and-replace across TMDL/PBIR files. You can open it straight from Desktop by clicking the project name in the title bar. Install the TMDL extension for syntax highlighting.

2. Choose how Tabular Editor connects: this decides your risk

Connected to Desktop (External Tool)Folder mode (.SemanticModel)
Who writes to diskOnly Power BI DesktopBoth Tabular Editor and Desktop
Sync neededNone: Tabular Editor edits Desktop’s model in memoryBoth tools have to reload
TE3 editionAnyBusiness / Enterprise
Best forDay-to-day work with Desktop openModel work with Desktop closed, CI/CD, scripting

My recommendation: if Desktop is open, connect Tabular Editor to it from External Tools. With only one tool writing to disk, there’s nothing to keep in sync. Use folder mode when Desktop is closed.

When connected, Tabular Editor’s changes reach Desktop’s model when you press Ctrl + S in Tabular Editor. Then save in Desktop to write the TMDL files. This second save is the step people most often miss.

Power BI Desktop External Tools ribbon with Tabular Editor 3, DAX Studio and other tools

The External Tools ribbon in Power BI Desktop. The title bar shows the file is a Power BI Project.

Tabular Editor 3 connected to Power BI Desktop, title bar showing localhost port

Tabular Editor 3 connected to Power BI Desktop. The title bar shows the local Analysis Services port (localhost:63649).

3. The routine: Save → Switch → Reload

If you edit files outside Desktop (VS Code, or Tabular Editor in folder mode), follow this every time:

  1. Save in Power BI Desktop before switching (Ctrl + S). Desktop keeps changes in memory until you save.
  2. Edit and save in the other tool.
  3. Back in Desktop, select Apply external changes in the banner. Desktop reloads the whole report and/or semantic model from disk.
  4. When going back to TE3 (folder mode), let it reload. It does this automatically if you have no unsaved edits (the status bar shows Model reloaded). If it asks, Reload discards your TE3 edits and Ignore keeps them. Changes are never merged.
Power BI Desktop banner: This project's files were changed externally, with Apply external changes button

The banner Desktop shows after a TMDL file is saved outside it.

If Desktop has unsaved edits, it warns you before applying. Cancel keeps your Desktop edits, and the file changes stay on disk without being applied. Apply external changes discards your unsaved Desktop edits and loads the files from disk.

Power BI Desktop dialog: Overwrite your unsaved edits, with Apply external changes and Cancel buttons

The overwrite warning: this is where unsaved work gets lost.

Tabular Editor 3 dialog: External changes detected, with Reload and Ignore buttons

TE3 in folder mode with an unsaved edit: Reload discards it, Ignore keeps it. With no unsaved edits, TE3 reloads silently and the status bar shows “Model reloaded.”

The rule that matters: never leave unsaved work in one tool while saving in another. A reload replaces the whole model, not just the object you changed.

Using Tabular Editor 2 (free)?

TE2 works with .pbip too. You can launch it from External Tools or open the .SemanticModel folder or .pbip file directly, and recent versions save TMDL the same way Desktop does. What TE2 doesn’t have is TE3’s automatic sync, so you do it by hand:

  • Prefer the External Tool connection. It’s just as safe as with TE3: only Desktop writes to disk. Save in TE2 (Ctrl + S) to send changes to Desktop, then save in Desktop.
  • TE2 won’t pick up changes made in Desktop by itself. If you change the model in Desktop while TE2 is open, close TE2 and launch it again from External Tools before editing further.
  • In folder mode there’s no hot reload. After Desktop saves, close the model in TE2 and open the folder again. Saving from a stale TE2 session overwrites what Desktop just wrote.
  • Keep TE2 up to date. Older versions have known problems connecting to recent Power BI Desktop releases.

4. Know the limits

  • Reloading resets filters and some parts of the Desktop UI.
  • Reloading also re-initialises visuals. In my test, the ArcGIS for Power BI visual asked me to accept its terms again after every reload.
  • Desktop doesn’t reload cache.abf, so new tables or columns need a refresh before they show data.
  • Don’t edit definition.pbir, report.json, mobileState.json, or semanticModelDiagramLayout.json outside Desktop.
  • If your project has an unappliedChanges.json file, apply those pending Power Query changes in Desktop first. Otherwise Desktop discards your external expression edits.
  • Don’t edit auto date/time tables with external tools.
  • The external-reload feature is still in preview, so its behaviour may change before general availability.

5. Let Git be your safety net

Before each switch, glance at VS Code > Source Control. The line-by-line diff shows exactly what changed on disk. Committing at each checkpoint (even locally, before pushing) means an accidental overwrite takes seconds to undo.

Desktop creates a .gitignore that excludes localSettings.json and cache.abf, so only metadata goes into your repo.

VS Code Source Control diff of a .tmdl file showing one added description line

VS Code Source Control: the one-line TMDL change (a column description) shown as a diff before committing.

Conclusion

Working across three tools is safe once you remember that only one should write to disk at a time. Connect Tabular Editor to Desktop while Desktop is open, use the Save → Switch → Reload routine when editing files directly, and commit often.

Setting up PBIP, Git and deployment pipelines for your team? ExcelFort helps organisations with Power BI consulting and implementation and hands-on Power BI training. Get in touch.

References

Do you connect Tabular Editor to Desktop, or work in folder mode? Share your setup in the comments.

Cheers!

Spread the word

Leave a Comment

Scroll to Top