Power Platform Extension for VS Code
Power Platform Extension for VS Code
On May 25th, we announced the public preview of the Power Platform Extension to VS Code. This helps organizations that continue to strive bridging the “collaboration” gap between with code-first developers and citizen developers. This public preview is available for developers on MacOS (Intel, and M1) and on Windows10.
The challenge in collaboration between code-first and citizen developers was that when they had to collectively trouble shoot a problem, either one of them had to get out of their native environment and go into the other’s environment, and in such cases the context loses importance, and the environment becomes the focus. When such cases arise, the time to problem resolution gets longer and both the citizen developer and the code-first developer have a sub-optimal experience. To improve this collaboration experience, we now introduce the Power Platform Extension for VSCode.
What is the Power Platform Extension for VSCode
The Power platform extension brings the Power Platform Command line interface (CLI) to work within the context of the VSCode Editing environment, and now code-first developers do not have get out of their developer environment while working with Power Platform artifacts. It is easy install and to start working right away.
Installing the Extension
To install the extension, a developer can go to either one of the following two places.
- VS Code Marketplace @ https://aka.ms/ppcvscode.
- Or install directly from the VSCode interface.
Installing from the URL
When you go to above mentioned URL, you will land at web page that looks like the following.
Figure 1: Power Platform Extension for VS Code; VS Code Marketplace page
Just click on the install button and it will launch VSCode and proceed with the install.
Installing from within VSCode
From within VSCode, select the Extensions view from the Activity Bar.
In the search box, type in “Power Platform”, and this will search the Extensions marketplace and
Select install, and once it is installed VS code informs you that the PAC CLI is ready to be used within the Terminal window
Figure 2: Power Platform Extension installation
To initiate the Power Platform CLI, go to the terminal window, and select a new terminal and the new extension is up and running
Now type in pac you will see the list of command that are now available.
What are some cool commands that are available?
Within VS code you can authentication profiles that allow you to either interact with the service at an administrator capacity or work with the environment directly
These administrative commands introduced in the PAC CLI now allow developers to create, remove, backup environments as needed.
List of all the administration commands and then listing out all the environments that are available to the developer.
This is a new feature introduced in the Command line interface and allows code-first developers to look at canvas applications and PowerFx functions within the VSCode editor. We have introduced the ability to pack and unpack msapp files and render them in a source code friendly way.
Figure 3: unpacking a canvas application
Figure 4: Canvas Application rendered in a source code friendly way
You can now also initialize solutions, export, import, publish, add license, solution check and many such functions directly from the PAC CLI as well.
We have now simplified the Package creation and build process. Using the PAC CLI, you can initialize a folder with the Package contents, run msbuild against the package content to build the package and then using the PAC CLI deploy the package. The add-reference flag allows you add multiple solutions with needing to modify any xml or mime type entries manually.
PowerApps Component Framework (PCF) Commands
Sometimes organizations want to have proprietary controls in their Applications, PCF allows for that. Using the command line interface, you can initialize, and deploy such custom controls via the CLI
For more details on how code custom controls, please go to the following tutorial
The PaPortal commands help you update and manage Portal Application within your environment. The supported commands are as follows:
Developers can now list portals, download, and upload portal artifacts
This is a very early access to a function, but all this does is create a plug-in class library, which can then be populated wit the appropriate business logic to be built and uploaded. You can generate your plug-in assemblies using standard visual studio build tools like MSBuild
Oh, and one more thing ….
The Extension code is available to view as Read-only on GitHub : https://github.com/microsoft/powerplatform-vscode/
And you can submit your issues there directly. We are eagerly awaiting your feedback on this exciting new capability.