Use the Visual Studio Code extension
VS Code allows you to extend your capability through extensions. VS Code extensions can add more features to the overall experience. With the release of this feature, you can now use the VS Code extension to work with Power Apps portals.
VS Code extension for portals
The Power Platform Tools adds the capability to configure portals using VS Code, and use the built-in Liquid language IntelliSense enabling help with code completion, assistance, and hinting while customizing portals interface using VS Code. Using the VS Code extension, you can also configure portals through the portals support for Microsoft Power Platform CLI.
Before using the VS Code extension for Power Apps portals, you must:
Download, install, and configure Visual Studio Code. More information: Download Visual Studio Code
Configure your environment and system for Power Apps portals CI/CD support using CLI. More information: Portals support for Microsoft Power Platform CLI (preview)
Install VS Code extension
After you install Visual Studio Code, you need to install the extension for the Power Apps portals plug-in for VS Code.
To install the VS Code extension:
Open Visual Studio Code.
Select (Extensions) from the left pane.
Select from the top-right on the extensions pane.
Search for and select Power Platform Tools.
Verify the extension is installed successfully from the status messages.
Download portals content
To authenticate against a Microsoft Dataverse environment, and to download portals content, refer to the tutorial Use Microsoft Power Platform CLI with portals - download portals content.
The Power Platform Tools Extension automatically enables using Microsoft Power Platform CLI commands from within VS Code through Visual Studio Integrated Terminal.
When customizing downloaded content using VS Code, you can now use IntelliSense for Power Apps portals Liquid tags.
The VS Code extension for portals automatically identifies and shows icons for files and folders inside the downloaded portals content.
VS Code uses the default file icon theme which doesn’t show portals-specific icons. To view file icons specific to your portals, you’ll have to update the VS Code instance to use the portals-specific file icon theme.
To enable a portals-specific file-icon theme:
Open Visual Studio Code.
Go to File > Preferences > File Icon Theme
Select the theme for Power Apps portals Icons.
The Visual Studio Code extension enables a live preview option to view the portals content page inside the Visual Studio Code interface during the development experience.
To see the preview, select from the top-right when having an HTML file open in edit mode.
The preview pane opens on the right side of the page being edited.
The preview feature requires that the other files are also open in the same VS Code session that make up the HTML markup for the preview to show. For example, if only the HTML file is opened without the folder structure opened using VS Code, you’ll see the following message.
When this problem occurs, open the folder using File > Open folder and select the downloaded portal content folder to open before you try to preview again.
The autocomplete capability in the VS Code extension shows the current context being edited, and the relevant autocomplete elements through IntelliSense.
The following limitations currently apply to the Power Platform Tools for portals:
- Snippet support and autocomplete features only support limited functionality.
- Live preview doesn't support custom themes or Liquid objects.
Submit and view feedback for