App package always returns error during deployment

%3CLINGO-SUB%20id%3D%22lingo-sub-2113604%22%20slang%3D%22en-US%22%3EApp%20package%20always%20returns%20error%20during%20deployment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2113604%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20SPFX%20Extension%20solution%20using%20react%20and%20PnP%20modules%20to%20create%20a%20custom%20command%20set.%20When%20i%20try%20to%20package%20and%20deploy%20to%20the%20SharePoint%20App%20Catalog%2C%20I%20am%20getting%20following%20error%3C%2FP%3E%3CP%3E%26gt%3B%20Invalid%20SharePoint%20App%20package.%20Error%3A%20Name%20cannot%20begin%20with%20the%20'%26lt%3B'%20character%2C%20hexadecimal%20value%200x3C.%20Line%2010%2C%20position%205.%3C%2FP%3E%3CP%3Emy%20element.xml%20under%20sharepoint%20folder%20is%20like%20this%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-json%22%3E%3CCODE%3E%0A%3CELEMENTS%20xmlns%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fsharepoint%2F%22%3E%0A%3CCUSTOMACTION%20title%3D%22LibraryExtension%22%20registrationid%3D%22100%22%20registrationtype%3D%22List%22%20location%3D%22ClientSideExtension.ListViewCommandSet.CommandBar%22%20clientsidecomponentid%3D%22ada4bf2b-a6c1-4074-a273-9d220c815e11%22%3E%3C%2FCUSTOMACTION%3E%0A%3C%2FELEMENTS%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20a%20missing%20of%20the%20closing%20%26gt%3B%20at%20the%20end%20of%20ClientSideComponentId%20value.%20But%20when%20I%20add%20%26gt%3B%2C%20the%20error%20will%20change%20to%20Object%20reference%20set%20to%20an%20instance%20of%20an%20object.%3C%2FP%3E%3CP%3ECan%20anybody%20help%20me%20on%20this.%20Thanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have a SPFX Extension solution using react and PnP modules to create a custom command set. When i try to package and deploy to the SharePoint App Catalog, I am getting following error

> Invalid SharePoint App package. Error: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 10, position 5.

my element.xml under sharepoint folder is like this

 

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Title="LibraryExtension"
RegistrationId="100"
RegistrationType="List"
Location="ClientSideExtension.ListViewCommandSet.CommandBar"
ClientSideComponentId="ada4bf2b-a6c1-4074-a273-9d220c815e11"
</CustomAction>
</Elements>

 

I found a missing of the closing > at the end of ClientSideComponentId value. But when I add >, the error will change to Object reference set to an instance of an object.

Can anybody help me on this. Thanks in advance.

0 Replies