Archive for June, 2022

General availability of Power Apps for Windows

With “Power Apps for Windows”

  • You can find all your canvas and model-driven apps including your Dynamics 365 apps and use them online or offline just like you can on iOS and Android!
  • You can configure model-driven apps to work automatically offline by creating an offline profile. For canvas apps, you can use the LoadData/SaveData functions to create a seamless offline experience.
  • Get device capabilities like camera, microphone, file picker, barcode scanning, geo-location and many others.

This app has been optimized for great app performance and supports the latest advanced feature provided by the Power Platform like the native Dataverse connector, Guest access and AI Builder.

Installing the App

  • Go to the Microsoft Store and install Power Apps for Windows.
  • When the app is installed, open it and sign in.
  • All your canvas and model-driven apps including your Dynamics 365 apps will be shown up as below.

Refer official documentation for more details.


Categories: PowerApps Tags:

PCF | Using Fluent UI and React | Error during react installation

Other day while building PCF project using Microsoft Fluent UI and React, got an error while installing ‘React’ using following command.

npm install react react-dom @fluentui/react

Reason and Fix:

  • Reason was, React 18 was installed in my machine and Fluent UI will not install since it requires a React version less than 18.
  • To fix the issue run following commands which uninstalls the current version and installs Fluent compatible version of React.
npm uninstall react react-dom @fluentui/react
npm install react@16.8.6 react-dom@16.8.6 @fluentui/react@8.29.0

Please refer Scott Durow article on the same issue.


Categories: PowerApps Tags: , ,

Power Platform CLI | Pack and Unpack solution using map xml

June 16, 2022 1 comment

Microsoft Power Platform CLI is a developer Command Line Interface, that empowers developers and ISVs to perform various operations related to environment lifecycle, authentication, and work with Dataverse environments, solution packages, portals, code components, and so on.

In this article lets learn how to use Pack and Unpack Solution Commands with map xml file.

Getting started with CLI:

  • There are 2 ways to install and use CLI.
    • Standalone Power Platform CLI :
    • Using Power Platform Tools for Visual Studio Code:
      • Follow steps specified here.
      • Power Platform Tools for Visual Studio Code is available on Windows 10, Windows 11, Linux, and MacOS.

Understanding Unpack and Pack commands:

  • Solutions are the mechanism for implementing application lifecycle management (ALM).
  • Its imperative to version control the Solution components to platforms such as Azure DevOps, Git Hub to maintain healthy ALM.
  • With the help of Unpack and Pack commands we can commit the Solution Components which enables version control.
Using Unpack command:
  • Lets you unpack solution zip files after they’ve been exported to the filesystem.
  • First export the solution to your machine.
    • In my case, I have ‘almplugins_1_0_0_0‘ solution exported and placed in ‘D’ drive.
  • To use ‘Unpack’, open the Command Prompt in ‘Admin Mode’ and run following command.
pac solution unpack -z D:\Practice\CLI\ -f D:\Practice\CLI\almpluginsunpacked.
  • Once the command executed successfully, Solution components unpack to “D:\Practice\CLI\almpluginsunpacked” path as specified in unpack command.
    • Note: My ‘‘ solution had only a ‘Plug-in assembly’ and ‘Plugin Steps’ hence you would see only those designated folders.
    • If the solution contains other components like Entities, Security Roles, Flows, etc. other relevant folders gets generated.

Using pack command:
  • Lets you pack files on a filesystem into a solution zip file.
  • Now, lets pack the Solution Components from the almpluginsunpacked folder using following pack command.
pac solution pack -z D:\Practice\CLI\ -f D:\Practice\CLI\almpluginsunpacked.
  • Once the command executed, you would find a new zip folder with name (i.e.,, specified in ‘pack’ command.

Now that you got some knowledge on usage of unpack and pack. Now lets use them with map xml file.

Why we need map xml:

  • Files that are built in an automated build system, such as plug-in assemblies, are typically not checked into source control.
  • If you open the almpluginsunpacked folder generated by unpack, there will be .dlls which are not supposed to be presented.
  • Also, while packing the solution components using ‘pack’, you would want the latest .dlls from your Plugin VS project to be packed.
  • map xml helps in above 2 scenarios. Lets see the usage of map xml in next section.
<?xml version="1.0" encoding="utf-8"?>
    <FileToFile map="PFESamplePlugins.dll" to="..\..\src\\Plugins\bin\**\PFE.Sample.Plugins.dll" />

    <FileToPath map="WebResources\*.*" to="..\..\src\WebResources\dist\**" />
    <FileToPath map="WebResources\**\*.*" to="..\..\src\WebResources\dist\**" />

unpack command with map xml:

  • As my almplugins_1_0_0_0 solution has 2 Plug-in assemblies, I got following 2 folders by executing unpack command.
  • If I go deep in to folders, there are alm-plugins2.dll and almplugins.dll as they were unpacked from almplugins_1_0_0_0 solution.
  • Lets run unpack again with map.xml.
Prepare map xml
  • My Plug-in projects folder structure is as follows.
  • Path of my alm-plugins2.dll will be C:\Users\rajeevpe\Source\repos\alm-plugins-v2\alm-plugins2\bin\Release\alm-plugins2.dll
  • Path of my alm.plugins.dll will be C:\Users\rajeevpe\Source\repos\alm-plugins-v2\alm-plugins\bin\Release\alm.plugins.dll
  • The map.xml structure will be as below
<?xml version="1.0" encoding="utf-8"?>
    <FileToFile map="D:\Practice\CLI\almpluginsunpacked\PluginAssemblies\**\alm-plugins2.dll" to="C:\Users\rajeevpe\Source\repos\alm-plugins-v2\alm-plugins2\bin\Release\alm-plugins2.dll" />
    <FileToFile map="D:\Practice\CLI\almpluginsunpacked\PluginAssemblies\**\almplugins.dll" to="C:\Users\rajeevpe\Source\repos\alm-plugins-v2\alm-plugins\bin\Release\alm.plugins.dll" />    
  • Save the map xml file with above content and execute following unpack command.
pac solution unpack -z D:\Practice\CLI\ -f D:\Practice\CLI\almpluginsunpacked\. -m D:\Practice\CLI\map.xml
  • This time, map file was considered by unpack command and skipped the generation of dlls in unpack folder location.

pack command with map xml:

As we have seen, unpack with map file would not generate dlls in to unpacked folder. The objective of map file during pack is to consider the latest .dlls from your Plugin VS project location.

Since we already prepared map xml file, we can refer the same in pack command as below.

pac solution pack -z D:\Practice\CLI\ -f D:\Practice\CLI\almpluginsunpacked\. -m D:\Practice\CLI\map.xml
  • If you notice, .dlls were mapped (i.e., copied) from plug-in VS projects location and packed in to a zip folder which can imported to target environments.

Hope you gained some knowledge on usage of pack and unpack commands using map xml file. In this article I only considered Plug-ins but map file can be used with Web resources as well.

Following articles provides more details.


  • Azure DevOps pipeline’s ‘Power Platform Pack Solution’ and ‘Power Platform UnPack Solution’ tasks uses PAC CLI and at the time of writing this article, both ‘Power Platform Pack Solution’ and ‘Power Platform UnPack Solution’ tasks does not support map xml.


Categories: PowerApps Tags: ,