I have the following custom action definition:
<CustomAction Id="MYRibbonTab" Location="CommandUI.Ribbon.ListView" RegistrationType="ContentType" RegistrationId="0x010014D754C688D12A4FB4C811B4B4F67A5C" Sequence="0" Rights="ViewListItems">
The location is defined as "CommandUI.Ribbon.ListView" and this displays the custom action button on the ribbon when the list is displayed.
But when I click on a list item the tab and button are also displayed on the DisplayFormToolbar. I have a separate feature defined that adds a custom button to the DisplayForm for the list item.
In Visual Studio, I also see a squiggly line underneath the "CommandUI.Ribbon.ListView" and an error when I hover over it that says:
The 'Location' attribute is invalid - The value "CommandUI.Ribbon.ListView" is invalid according to its datatype. 'http://schemas.microsoft.com/sharepoint/:CustomActionLocation' The Enumeration constraint failed.
How can I display my custom action only on the Ribbon for the list view and not on the ribbon for the list item?