XML element method is working for classic pages, for modern pages it is not working.
Using SPFx list view command set I can create ECB menu for list item level I am unable to find anything for personal actions which will work in modern UI as well.
For Sharepoint Online I tried Site/Web.UserCustomActions.add()
.
For SharePoint 2019 on premise I tried:
<CustomAction Id="MyID" Title="MyTitle" Description="MyDesc" Location="Microsoft.SharePoint.StandardMenu" GroupId="PersonalActions" ImageUrl="cust/image/path" > <UrlAction Url="cust url"/> </CustomAction>
None of the above worked for modern UI.