Comments (6)
Ah my apologies, I didn't realize it's looking for the xml file. Ya it should be in there. Basically you need to create the sharepoint/assets/elements.xml file. In there you will need to provide the custom action registration.
See this documentation.
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api#add-a-listview-command-set-to-a-solution-package-for-deployment
I haven't tested, but this looks to be a document library. This elements xml may work, though I haven't tested
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Title="SPFxDocumentPreview"
RegistrationId="101"
RegistrationType="List"
Location="ClientSideExtension.ListViewCommandSet.CommandBar"
ClientSideComponentId="5fc73e12-8085-4a4b-8743-f6d02ffe1240"
ClientSideComponentProperties="{"sampleTextOne":"One item is selected in the list.", "sampleTextTwo":"This command is always visible."}">
</CustomAction>
</Elements>
from sp-dev-fx-extensions.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
from sp-dev-fx-extensions.
You must run
gulp bundle --ship gulp package-solution --ship
from sp-dev-fx-extensions.
Hi @bcameron1231 and thank you for your answer,
When I run this I get the following error:
Error - 'package-solution' sub task errored after 2.11s
Could not find Element Manifiest: sharepoint\assets/elements.xml
Any ideas?
from sp-dev-fx-extensions.
Hi @bcameron1231,
I have tried with your elements.xml and replaced the ClientSideComponentId with my file ID: /src/extensions/documentPreview/DocumentPreviewCommandSet.manifiest.json
When I run the command again I get the following error:
Error - 'package-solution' sub task errored after 2.14s
Could not find Element Manifiest: sharepoint\assets/ClientSideInstance.xml
Just in the documentation that you have sent me appears the method to create this ClientSideInstance.xml file, here is the sample:
{ "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", "solution": { "name": "command-extension-client-side-solution", "id": "0abe5c73-1655-49d3-922b-7a47dd70e151", "version": "1.0.0.0", "includeClientSideAssets": true, "isDomainIsolated": false, "features": [ { "title": "Application Extension - Deployment of custom action.", "description": "Deploys a custom action with ClientSideComponentId association", "id": "25f8df47-61f2-4d75-bfe2-8d614f775219", "version": "1.0.0.0", "assets": { "elementManifests": [ "elements.xml", "clientsideinstance.xml" ] } } ] }, "paths": { "zippedPackage": "solution/command-extension.sppkg" } }
*I have created the file but two ID's appear but I don't know why to replace them as neither matches the elements.xml file in that same document.
When I run the command again, it correctly creates the .sppkg file in /sharepoint/solution but when I install the application in SharePoint Online the following error appears in the column "Valid app package": No. Invalid SharePoint App package. Error: The specified node cannot be inserted as the valid child of this node, because the specified node is the wrong type.
Thank you again.
from sp-dev-fx-extensions.
Any ideas?
from sp-dev-fx-extensions.
Related Issues (20)
- Breadcrumbs keep getting shorter when you try to change window size HOT 1
- react-application-messagebanner - HOT 2
- "npm i" for react-application-announcements sample fails due to "@microsoft\gulp-core-build-sass" HOT 2
- Sample missing README details: react-application-news-ticker HOT 5
- Solution Deployment Error HOT 2
- react-application-news-ticker - HOT 2
- The second time I click "Change Layout" the Dialog is maintaining a value of true for hideDialog HOT 1
- Create an extension to let users add sharepoint libraries/floders/files to a Teams channel as a chat or a message HOT 2
- Unable to translate the pages to the language code "fr-ca" HOT 1
- react-command-form-settings not redirect to my custom page HOT 1
- (react-application-news-ticker) If I wanted to use a List with a different name 'News', where would I need to make a change? HOT 1
- Print Does not Pickup any Barcode Values when enabled for List HOT 1
- PRINT Sample does not work HOT 3
- Adding form customizers as a category on the search page of the website HOT 10
- react-command-change-page-layouttype - HOT 1
- Cannot bundle react-command-document-preview HOT 1
- react-application-personal-assistant - HOT 3
- react-application-pva-bot - Error instalar error al instalar y ejecutar gulp serve HOT 1
- react-application-machine-translations - HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sp-dev-fx-extensions.