Command bar application lifecycle management
When you customize a command bar in a Microsoft Power Apps model-driven app, Microsoft Dataverse solutions track those changes. Dataverse solutions help you move command bar customizations, the app, and related components across Microsoft Power Platform environments—such as development, test, and production.
When you create your first command using the command bar designer, you choose a command type. That choice determines whether a component library is required. A component library is needed if you use Power Fx for the Visibility or OnSelect properties of the command. The following dialog lets you choose between Power Fx and JavaScript for command logic:
A component library isn’t required if your command uses only JavaScript. However, you can create a component library at any time to use Power Fx by selecting Run formula or Show on condition in the command property panel. When you do, you're prompted to create the component library.
It's best to create a custom Dataverse solution for your app and related assets. If the app is in a custom solution, the component library is as well. Otherwise, they're placed in the Common Data Services Default Solution. The component library name combines your app name with DefaultCommandLibrary. The following image shows a solution that includes apps, flows, and component libraries:
If you customize command bars in multiple apps using Power Fx, each app has its own corresponding component library.
Each component library contains a component for every Power Fx formula used in command bar commands. Other properties—such as display labels, icons, and tooltips—are part of the model-driven app configuration. Understanding how these components are tracked in Dataverse solutions is important because customizations can become out of sync between environments. For example, changes made directly in a test environment after importing a managed solution can result in a mismatch.
If a command bar command doesn't show the latest changes, check the solution layers to see whether an unmanaged change is blocking visibility. In solution explorer, select the component library, then select Advanced > See Solution Layers. The following image shows an example of unmanaged layer on top of a managed solution:
In this example, someone made an unmanaged change in the environment. As a result, importing updates won’t apply until the unmanaged layer is removed.
Always make changes in your development environment to avoid unintended unmanaged layers. You can also prevent customizations by setting the component library’s managed properties so that it doesn't allow customizations:
Disabling customizations prevents editing Power Fx formulas for Visibility and OnSelect, but it doesn't restrict updates to other command properties such as Display Label. This restriction only takes effect after exporting the solution as managed and importing it elsewhere. If you try to change the component library after importing it as managed, you’ll see the following error:
Localization support
After customizing a command bar, you might want to translate its labels for users in other languages. To do so:
- In solution explorer, select Translations > Export translations.
- After the export completes, a ZIP file downloads.
- Extract and open the
CrmTranslations.xmlfile in Excel. - On the Localized Labels sheet, scroll to the rows where Entity Name contains "appaction".
- Each command may include multiple entries for properties such as text, tooltip, and description. Enter translations in the appropriate language column, such as 1034 for Spanish.
When finished, save the file and zip up the translation files. Then use Translation > Import translations to update the solution. Repeat this process when updating labels or adding commands.
Dataverse solutions help track and move command bar customizations between environments. They also manage dependencies, ensuring components like the component library aren’t removed if still needed by the app. Always confirm that both the app and the component library are in the same custom solution before exporting to avoid missing dependencies.





