web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / VS Code For Power App ...
Power Apps
Answered

VS Code For Power App Development

(1) ShareShare
ReportReport
Posted on by 31
Hi all, 
 
Looking to see if anyone has guidance on how to optimally work with VS code for power app development. 

I have been using it for a bit now, but feel I am only scratching the surface of the potential support it could provide. 

Any good posts/videos that outline the best setup for specific dev requirements for different project types? (i.e. Canvas vs. Model Driven App Projects + PAC CLI Fundamentals)

Currently, I have some basic template prompts to use with CoPilot and have a few scripts that can generate some schema documentation from my solution exports, which I then use to have CoPilot review my Power FX  / JS Web Resource files against. 

Ideally would love to kick this up to the next level and understand a bit better how to make the jump into using some of the more advanced tools and ideal workflows. 

Any info is good info!

Cheers,

 
I have the same question (0)
  • Verified answer
    charlessexton Profile Picture
    21 Super User 2024 Season 1 on at
    Have you looked into Code Apps? It's expected to move from preview to generally available soon.
     
     
    I would highly recommend it. I'm absolutely loving using them, and I'm building apps many, many times faster than I did with canvas and model-driven apps.
     
    My friend and I have been releasing videos to help people get started, as it can be quite intimidating otherwise: https://www.youtube.com/playlist?list=PLexP1PjIhnQzYhKCumdJW-Jcxsy9Qxq73
  • Suggested answer
    VASANTH KUMAR BALMADI Profile Picture
    281 on at

    You’re absolutely right — VS Code is far more powerful than most Power Apps developers realize. Once you step beyond basic PAC CLI commands, you unlock a professional workflow that scales well across teams, environments, and project types.

    Below is a real-world workflow guide — not generic marketing fluff — focused on how to set up your environment and processes for advanced Power Platform development.

    📌 1. Editor Setup (VS Code)

    Essential Extensions

    Install the following first:

    • Power Platform VS Code Extension Pack

      • Includes PAC CLI integration, solution explorer, and more

    • ESLint + Prettier

      • For consistent formatting of JS/TS web resources

    • GitLens + GitHub Pull Requests

      • Advanced source control insights

    • XML Tools / JSON Tools

      • Useful for PCF manifest editing

    • REST Client

      • Great for quick Dataverse Web API testing

    • npm Intellisense / Path Intellisense

      • Improves development speed for PCFs and Node projects

    This creates a full IDE experience for both PowerFX and web resource/PCF development.

    📌 2. Power Platform CLI (PAC CLI) Workflow

    Core Commands

    Learn these by muscle memory:

    pac solution init
    pac solution add-reference
    pac solution pack
    pac solution unpack
    pac auth create
    pac org who
    

    Environment Switching

    Store environments in named auth profiles:

    pac auth create --name dev
    pac auth create --name uat
    

    Then switch:

    pac auth select --name uat
    

    This avoids accidental deployment to the wrong org — huge time saver.

    📌 3. Project Types + Folder Structures

    People often treat Canvas/Model driven the same way — but their workflows should differ.

    🔹 Canvas App Projects

    You’re mostly managing:

    • JSON source files

    • App versions

    • CoPilot prompts for PowerFX patterns

    • Test data patterns

    Best Practices

    ✔ Use a template folder for common components
    ✔ Store screens as separate JSON slices
    ✔ Use a script to normalize theme + styles
    ✔ Track connected data sources in a manifest

    Example structure:

    canvas-app/
    ├── screens/
    ├── components/
    ├── data-sources.json
    ├── styles.json
    ├── powerfx/
    

    🔹 Model Driven + Dataverse Projects

    This is where VS Code really shines.

    Components you should source control

    • Model-driven app XML

    • Entities & forms

    • Views

    • Business rules

    • Security roles

    • Custom APIs / Plugin assemblies

    • Custom PCFs

    • Option sets & metadata

    • Environment variables

    Use:

    pac solution unpack --solutionname MySolution
    

    This produces human-readable artifacts you can diff and merge in Git.

    📌 4. Build & CI/CD (not often discussed)

    Your local workflow should mirror your CI/CD.

    Recommended pattern

    • dev branch → unpack solution

    • feature branches → make changes

    • PR validations → run scripts

    • build pipeline → solution pack → import to UAT

    Example GitHub Actions

    on: [pull_request]
    
    jobs:
      validate:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - run: |
              npm install -g pac
              pac auth create --url ${{ secrets.ORG_URL }}
              pac solution validate --path ./solution
    

    Once validated:

    Deployment workflow

    pac solution pack
    pac solution import --path MySolution.zip
    

    📌 5. Testing Strategy

    Canvas Apps

    • Use automated UI test tools (Playwright or Selenium)

    • Build a test harness app

    • Script UX flows like form submit, navigation

    Model Driven

    Use Unified Interface test plans or Power Apps Test Studio

    API level

    Use REST Client or Postman collections to validate:

    • CRUD

    • Actions

    • WebHooks

    Store collections in Git.

    📌 6. Advanced Tools Beyond Basic CLI

    🔹 Dataverse Code Samples + SDK

    Use the SDK in VS Code for:

    • Bulk operations

    • ExecuteMultiple

    • Custom API implementations

    Example in C# or TypeScript

    🔹 Power Apps Component Framework (PCF)

    This is where VS Code is basically required.

    Workflows:

    pac pcf init
    pac pcf push
    pac pcf build
    

    Structure:

    pcf/
    ├── controls/
    └── components/
    

    Test with local watch mode.

    🔹 Scripts to Extract and Document

    You mentioned schema docs — that’s excellent and highly underutilized.

    Examples:

    • Auto export entity metadata

    • Generate Markdown docs

    • Sync docs with Git

    Example script (PowerShell):

    Get-CrmEntity -LogicalName contact | Select LogicalName, Attributes | ConvertTo-Markdown
    

    Commit docs to Git → auto generate Confluence pages via pipeline.

    📌 7. Making Copilot Work Better

    Instead of adhoc prompts, build custom prompt templates:

    Examples:

    Rewrite this Power FX to be more performant…
    Identify delegation issues…
    Generate test cases for this screen…
    

    Store them in:

    prompts/
    ├── powerfx/
    └── javascript/
    

    Then feed with context > reference manifests > ask for unit tests or suggestions.

    📌 8. Scripted Quality Checks

    Add scripts to catch common issues:

    • Untrimmed SQL fields

    • Missing required fields

    • Delegation warnings

    • Unused data sources

    Integrate them into pre-commit hooks:

    npx husky add .husky/pre-commit "npm test"
    

    🧠 TL;DR — A Pro Power Apps Dev Workflow

    Area Pro Practice
    Source Control Unpack everything to text files
    Environment Management Named PAC CLI auth
    Branching Feature branches + PR
    CI/CD Automated solution validation & import
    Testing CLI-integrated UI + API tests
    Copilot Prompt templates + contextual inputs
    Documentation Automated schema exports

    🔎 Recommended Resources

    You asked for guides/videos — here are the best community/official ones:

    📌 Microsoft Power Platform CLI docs
    âž¡ https://learn.microsoft.com/power-platform/developer/cli

    📌 VS Code Extension Pack walkthrough
    âž¡ https://www.youtube.com/watch?v=uxhM4nciJrA

    📌 Official DevOps + Power Platform pipeline
    âž¡ https://learn.microsoft.com/power-platform/alm/build-tools

    📌 PCF deep dive for VS Code
    âž¡ https://learn.microsoft.com/power-platform/developer/component-framework

  • Treichs Profile Picture
    31 on at
    @charlessexton

    Thanks for the info and the links. 

    Will give it some dedicated viewing time. Always hungry to understand more about how I can level up my Power App Dev skills. 

    Currently releasing my first company wide Model Driven App (scary...) and have learned a ton from just trial and error. However, eager to see how I can improve future applications and their dev process through additional tools and features. 

    Cheers, 


    **Update: Watched the first video in your linked playlist and it was extremely helpful and very easy to follow! Excited to continue watching and following along. Thanks again. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard