← All entries

Compiling and deploying PCF controls after TSX edits

Praxisis D365 Wiki · Public reference · Client-specific details redacted

Source: Claude.ai chat (original: compiling-pcf-control-after-tsx-modifications__83cb67df.md) Added: 2026-10-02

Summary

  • Local build / test cycle: npm install (first time or new packages) → npm run build (TSX → out/controls/.../bundle.js) → npm start watch (opens test harness with hot reload).
  • Dev fast-loop: pac auth select --name dev → pac pcf push --publisher-prefix <yourprefix> — builds and imports into a temp solution PowerAppsTools_<prefix>. Fine for dev only — never promote this way.
  • Promotion to Test/Prod requires: bump version in ControlManifest.Input.xml (else env keeps old bundle), add the control to the real solution once (Add existing → Custom control), then pull.ps1 + production build (npm run build -- --buildMode production or dotnet build -c Release on the .cdsproj) + push.ps1.

Key takeaways

  • "My change isn't showing" is almost always a cached bundle — hard-refresh (Ctrl+F5), or add ?ver=N to the URL, or use a private window.
  • The version bump is mandatory — without it, the environment ignores the new bundle even if the solution import succeeds.
  • Treat PowerAppsTools_<prefix> as the dev scratch solution; it must never cross environment boundaries.

Learnings / how to apply

  • Package the loop as a scripts/pcf-build-push.ps1 so iteration is one command. Standard Praxisis PCF developer pattern.
  • Include "version bump + cache bust" in every PCF promotion checklist — these are the two deployment-fails-silently traps.

Need this applied to your own tenant?

Praxisis Sustain Self-Serve builds a private AI Wiki trained on your documents and tickets, with free Tier-2 support when the AI cannot answer. Book a 30-min overview.