0

I have an SPFx extension deployed to my tenant app catalog. The app implements a list view command set and in package-solution I set skipFeatureDeployment to false so that site owners can add the app to their sites.

The package-solution file contains this one feature in the features section:

 { 
            "title": "HelloSign - this feature deploys a custom action to allow users to send documents to HelloSign for signature", 
            "description": "Deploys a custom action with ClientSideComponentId association", 
            "id": "40867f69-f2e4-454e-9c5f-9a511276ae75", 
            "version": "1.0.0.0", 
            "assets": { 
                "elementManifests": [ 
                    "elements.xml", 
                    "ClientSideInstance.xml" 
                ] 
            } 
}

When users first deploy the app, everything works fine. They see my custom action when they select a file in a document library. If they look at site features, they see the feature that was deployed via the app and it is Active. If they look at {siteurl}/_api/Web/UserCustomActions it shows the custom action itself.

If however, users remove the app from their site and then deploy it again, none of the above happens. They don’t see my custom action when they select a file in a document library. The feature that is deployed via the app does not show in site features. If they look at {siteurl}/_api/Web/UserCustomActions it is empty.

My elements.xml file looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction
        Title="HelloSign"
        RegistrationId="101"
        RegistrationType="List"
        Location="ClientSideExtension.ListViewCommandSet.CommandBar"
        ClientSideComponentId="6e6f9c79-b45f-4967-b6bd-f81169c8171e"
        ClientSideComponentProperties="....">
    </CustomAction>
</Elements>

My ClientSideInstance.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <ClientSideComponentInstance
        Title="HelloSign"
        Location="ClientSideExtension.ListViewCommandSet.CommandBar"
        ListTemplateId="101"
        Properties="..."
        ComponentId="6e6f9c79-b45f-4967-b6bd-f81169c8171e" />
</Elements>

Anyone have any idea why the feature would not be added back when a user deletes, and then re-adds the app?

8
  • Is there a reason they would be deleting it from the site and then re-adding it? Commented Aug 2, 2022 at 13:51
  • no reason, probably user error.
    – RussGove
    Commented Aug 2, 2022 at 15:50
  • If the feature appears to have been re-installed and it doesn't load, then I would imagine it's a caching problem but if it the feature doesn't appear then it could be a bug with SharePoint. Commented Aug 2, 2022 at 16:36
  • yeah, the feature is not reinstalled. seems others must have hit this too. I just tested with a fresh commandset from [email protected]. Same exact thing.
    – RussGove
    Commented Aug 2, 2022 at 16:46
  • cross posted to techcommunity.microsoft.com/t5/sharepoint-developer/…. See if anyone there has a clue.
    – RussGove
    Commented Aug 2, 2022 at 16:48

2 Answers 2

0

figured it out. deleting the app from recycle bin (level 1 and 2) then reinstalling works fine.

0

Always follow this process to completely remove SPFx app/extension from site:

  1. Remove app/extension from site (site contents)
  2. Delete the SPFx app from first-stage recycle bin
  3. Delete the SPFx app from second-stage recycle bin (SCA recycle bin)

And then re-install the SPFx solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.