microsoft / vsts-extension-multivalue-control

A work item form control which allows selection of multiple values.
MIT License
47 stars 45 forks source link

"The Element "WebLayout" has invalid child element "Extensions" #29

Closed pguerre closed 7 years ago

pguerre commented 7 years ago

I added this extension in TFS 2017.2 (on-premise). however, when attempting to upload a WIT xml with the extensions element, Bug WIT, for example, I get an error saying the "The Element "WebLayout" has invalid child element "Extensions". List of possible elements expected: "Page, PageContribution". Is this a bug?

mmanela commented 7 years ago

You need to make sure Extension is the first element under . Did you put it after ?

GOOD

     <WebLayout>
        <Extensions>
           <Extension Id="mmanela.vsts-workitem-recentlyviewed" />
        </Extensions>
        <SystemControls>
          <Control Type="FieldControl" FieldName="System.Title" EmptyText="Enter title" />
        </SystemControls>

BAD

     <WebLayout>
        <SystemControls>
          <Control Type="FieldControl" FieldName="System.Title" EmptyText="Enter title" />
        </SystemControls>
        <Extensions>
           <Extension Id="mmanela.vsts-workitem-recentlyviewed" />
        </Extensions>
pguerre commented 7 years ago

great thank you! that worked, I found an article and it placed it after the system controls element. https://blogs.msdn.microsoft.com/devops/2017/01/13/new-work-item-form-in-tfs-2017/ the error message is pretty vague so it doesnt really say much about where to put it even though it technically still is within the weblayout and outside of the systemcontrols

mmanela commented 7 years ago

@pguerre Ill update the blog to call this out explicitly. And Ill see if we can improve that error message. Thanks!