Issue Symptom: Repackging of extracted solution thru SolutionPackager fails for Sitemap component with error: 'RootComponentValidation': RootComponent validation failed.
Cause : After the 9.2 Train 21073.* deployment of Dataverse(CDS/CRM) 4 new nodes were introduced to the customizations XML for the default sitemap. This has resulted in errors when repacking solutions using the solution packager or build tools. These are 4 tags are introduced recently on the XMLs within the Sitemap tag:
<EnableCollapsibleGroups>False</EnableCollapsibleGroups>
<ShowHome>True</ShowHome>
<ShowPinned>True</ShowPinned>
<ShowRecents>True</ShowRecents
Root cause: Repack expects one child of the root Sitemap node and throws error for additional nodes. When the additional nodes are removed the solution packs without error.
This issue only applies to the default sitemap. It does not impact model driven app sitemaps and it only occurs if the default sitemap is included in the solution.
Example with Error detail :
Nodes added to the sitemap XML in the customizations XML file:
<EnableCollapsibleGroups>False</EnableCollapsibleGroups>
<ShowHome>True</ShowHome>
<ShowPinned>True</ShowPinned>
<ShowRecents>True</ShowRecents>
Error logged when repacking the solution:
Error Following objects, required by the solution, are not present.
Type='SiteMap', Id (or schema name)='SiteMap-{d5684797-805b-4188-b8fa-1028cfbef003}'.
Type='SiteMap', Id (or schema name)='SiteMap-{d5684797-805b-4188-b8fa-1028cfbef003}'.
Type='SiteMap', Id (or schema name)='SiteMap-{d5684797-805b-4188-b8fa-1028cfbef003}'.
Type='SiteMap', Id (or schema name)='SiteMap-{d5684797-805b-4188-b8fa-1028cfbef003}'.
Please do a dependency check on your solution prior to exporting, add the missing objects to your solution and re-export
Error occurred during execution of plugin 'RootComponentValidation': RootComponent validation failed.
SolutionPackager: PluginExecutionException thrown: Microsoft.Crm.Tools.SolutionPackager.PluginExecutionException: RootComponent validation failed.
How to work around to allow success of Repackage operation =>
1. Remove above 4 tags within the customizations.xml if you really need to pack the Default Sitemap in your solution package. They are harmless optional fields for modern sitemap capability.
2. Don't add the Default Sitemap to the solution when exporting as it's legacy Web client Sitemap and no longer needed on online version of Unified Client app.
Next steps: A new version of SolutionPackager tool be made available soon that customers can download and use in their DevOps pipeline.