Installing and Using Microsoft Power Platform Tools in Visual Studio Code

Microsoft’s Power Platform provides low‑code tools like Power Apps, Power Automate, Power BI and Power Pages to build business applications quickly. For developers who prefer working in code editors, Microsoft offers Power Platform Tools for Visual Studio Code (VS Code). This extension packages the Microsoft Power Platform command‑line interface (PAC CLI) and provides a graphical experience for managing Power Pages sites. This guide walks you through installing the tools and using the most common commands.
Prerequisites
Before installing the Power Platform tools, make sure you meet these prerequisites:
- Visual Studio Code – Download and install VS Code for your operating system.
- .NET runtime – On Windows the extension requires the .NET 4.8 runtime and on macOS/Linux the .NET 6.0 SDK marketplace.visualstudio.com.
Step 1 – Install the Power Platform Tools extension
You can install the extension either from the Visual Studio Marketplace or directly inside VS Code. The Marketplace approach opens VS Code for you, while the in‑editor method keeps you inside the editor.
Option A – Install from the Marketplace
- Open the extension page. Navigate to the Power Platform Tools page on the Visual Studio Marketplace. The page describes the extension and lists requirements.
- Select Install. On the Marketplace page, select Install If prompted, allow the browser to open VS Code.
- Approve the prompts in your browser. Your browser may ask to open VS Code; select Open. VS Code will open and display the extension details page.
- Install in VS Code. In VS Code, choose Install to complete the installation.
Option B – Install from within VS Code
- Open VS Code and select the Extensions icon in the side bar (or press <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd>). The Extensions view lists installed extensions and provides a search box.
- Search for “Power Platform Tools.” In the search box, type power platform tools. The Microsoft Power Platform Tools extension will appear in the results.
- Select Install. Click the Install button on the extension’s tile. VS Code downloads the extension, installs it and displays a completion message.
Verifying the installation
After installation, the extension makes the PAC CLI available inside the VS Code integrated terminal. To verify that the CLI is available:
- Open the VS Code Terminal (Terminal → New Terminal).
- Enter
pac
and press <kbd>Enter</kbd>. If installed correctly, the CLI prints usage information and lists command groups such asadmin
,auth
,org
,package
,paportal
,pcf
, andsolution
marketplace.visualstudio.com. - When new versions are released, the extension automatically updates. You can also install previous versions by selecting Install Another version… from the extension’s drop‑down menu.

Step 2 – Basic use of the PAC CLI
The Microsoft Power Platform CLI lets you manage environments, solutions and Power Pages sites from the command line. After installing the VS Code extension, you can run pac
commands in the integrated terminal. Below are common tasks.
Authenticate and manage environments
Most CLI commands require authenticated access to Dataverse environments. You create an auth profile using the pac auth create
command. The --environment
parameter connects directly to a specific environment:
pac auth create --environment "MyEnvironment"
To see all auth profiles on your machine, use pac auth list
. Each profile is assigned an index value. Select a different profile with pac auth select
and the index:
pac auth list # list auth profiles
pac auth select --index 2 # switch to profile at index 2
After authenticating, you can display available environments (Dataverse organizations) and select one:
pac org list # show all environments
pac org select --environment "EnvName" # set the current environment
Listing environments helps you identify the environment name used in subsequent commands. The pac org select
command uses the environment’s unique name when there are multiple environments with similar display names.
List, export and import solutions
Solutions are packages of customizations and components for the Power Platform. Once an environment is selected, list all solutions with:
pac solution list # lists all solutions in the current environment:contentReference[oaicite:13]{index=13}
To export a solution, specify the path to save the .zip
file, the internal solution name and whether it should be managed. For example:
pac solution export \
--path C:\\exports\\MySolution.zip \
--name MySolution \
--managed true
To import a solution into the current environment, provide the path to the .zip
filele:
pac solution import --path C:\\exports\\MySolution.zip
These commands streamline moving solutions between development and test environments without opening the Power Apps portal.
Other useful commands
The CLI includes many sub‑commands. Run pac help
or pac <subcommand> help
to see optionsmarketplace.visualstudio.com. For example, pac solution help
displays commands such as init
, add-reference
, list
, import
, export
and pack
marketplace.visualstudio.com. Use pac solution init
to create a new Dataverse solution project, and pac solution unpack
to extract a solution .zip
into source files for version control.
Step 3 – Managing Power Pages sites in VS Code
When you install the Power Platform Tools extension, a Power Pages Actions pane appears in the Explorer side bar. It lists sites in three categories:
- Active Sites – currently available and active in the selected environment.
- Inactive Sites – present in the environment but not active.
- Other Sites – downloaded locally but not associated with an environment.
Right‑click a site to access context‑specific actions:
- Preview – clears the cache and opens the site inside VS Code using the embedded Microsoft Edge DevTools. You can view changes immediately.
- Upload – uploads local changes back to your environment.
- Download – downloads site content to a local folder for offline editing.
- Site Details – displays information like the website ID, URL and data‑model version.
- Reveal in Explorer – opens the local directory that contains the site’s code.
For inactive or local sites, options include Open Site Management and Upload Site. After uploading a local site, it appears in the inactive list; you can activate it from the Power Pages home page.
Step 4 – Editing and IntelliSense features
The extension improves the editing experience for Power Pages development:
- File‑icon theme – VS Code shows icons specific to Power Pages files (web pages, templates, snippets, etc.) when you enable the Power Apps portals file‑icon theme. Enable it via File → Preferences → Theme → File Icon Theme, then select Power Apps portals Icons.
- In‑editor preview – The Preview action runs an embedded Microsoft Edge browser with device emulation and DevTools. It always reflects the latest uploaded changes.
- IntelliSense for Liquid tags – When editing templates, the extension provides autocomplete suggestions for Liquid tags and objects. Typing
{{
and pressing <kbd>Ctrl</kbd>+<kbd>Space</kbd> displays available objects; typing<CTRL> – space
in a{% include %}
statement lists template names. This improves accuracy and reduces syntax errors. - Context menu actions – You can create, delete or rename website components (pages, templates, snippets and web files) from the context menu or the command palette (
Ctrl + Shift + P
). This simplifies content management.
Conclusion
With the Power Platform Tools extension, Visual Studio Code becomes a powerful environment for developing low‑code solutions. Installing the extension is straightforward, either from the Marketplace or within VS Code. Once installed, the PAC CLI provides an extensive set of commands to manage environments, authentication profiles and Dataverse solutions. For Power Pages development, the extension adds graphical site management, in‑editor previews, and rich IntelliSense. Together, these features bring the convenience of the Power Platform to your favourite code editor.
