Element '{http://schemas.microsoft.com/appx/developer/windowsTemplateStudio}Metadata' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Package

Hong 1,051 Reputation points
2021-06-22T13:27:10.52+00:00

A UWP app worked fine for a number of years. When I tried to build it today, I got error:

error APPX0501: Validation error. error C00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 57, Column 4, Note: The schema for MaxVersionTested specified does not recognize XML fields with namespace "http://schemas.microsoft.com/appx/developer/windowsTemplateStudio". Please ensure that you have the correct MaxVersionTested specified. Reason: Element '{http://schemas.microsoft.com/appx/developer/windowsTemplateStudio}Metadata' is unexpected according to content model of parent element '{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Package'.

I think the problematic code is the following:

  <Metadata xmlns="http://schemas.microsoft.com/appx/developer/windowsTemplateStudio">
    <Item Name="generator" Value="Windows Template Studio" />
    <Item Name="projectType" Value="Blank" />
    <Item Name="framework" Value="MVVMBasic" />
    <Item Name="platform" Value="Uwp" />
  </Metadata>

It was generated automatically when the project was created.

Could anyone offer a tip on how to fix this?

I wonder if this is related to the recent VS2019 update. I am using VS Version 16.10.1.

Universal Windows Platform (UWP)
{count} votes