简体   繁体   English

错误 0xC00CE020:应用程序清单验证错误:应用程序清单必须根据架构有效,,缺少必需的属性“ForegroundText”

[英]error 0xC00CE020: App manifest validation error: The app manifest must be valid as per schema ,,, Required attribute 'ForegroundText' is missing

Launched a "blank Windows 10 Universal App" using "Visual Studio 2015 RC".使用“Visual Studio 2015 RC”启动了“空白 Windows 10 通用应用程序”。 I am not able to see the design view for MainPage.xaml.我看不到 MainPage.xaml 的设计视图。 The designer shows the following Error:设计器显示以下错误:

error 0xC00CE020: App manifest validation error: The app manifest must be valid as per schema: Line 20, Column 8, Reason: Required attribute 'ForegroundText' is missing错误 0xC00CE020:应用程序清单验证错误:应用程序清单必须根据架构有效:第 20 行,第 8 列,原因:缺少必需的属性“ForegroundText”

Tried including 'ForegroundText="dark"' attribute in Package.appxmanifest file but the attribute seems to be undeclared for VisualElements.尝试在 Package.appxmanifest 文件中包含 'ForegroundText="dark"' 属性,但该属性似乎未针对 VisualElements 声明。

     <uap:VisualElements
          DisplayName="BackgroundSensorsCS"
          Square150x150Logo="Assets\squareTile-sdk.png"
          Square44x44Logo="Assets\SmallTile-sdk.png"
          Description="BackgroundSensorsCS"
          BackgroundColor="#00b2f0"
          **ForegroundText="dark"**>
            <uap:SplashScreen Image="Assets\Splash-sdk.png" />
            <uap:DefaultTile>
                <uap:ShowNameOnTiles>
                    <uap:ShowOn Tile="square150x150Logo" />
                </uap:ShowNameOnTiles>
            </uap:DefaultTile>
        </uap:VisualElements>

在 Windows 10 Preview, Build 10074 上重新安装 Visual Studio 2015 RC 后,该问题得到解决。

Somehow, I started experiencing a similar issue while developing a UWP app.不知何故,我在开发 UWP 应用程序时开始遇到类似的问题。 It said some 'Wide..' attribute was not defined in the DTD.它说 DTD 中没有定义一些“Wide..”属性。 So I went to the project's properties > Application and tried to open the package manifest.所以我去了项目的属性>应用程序并尝试打开包清单。 I then deleted the faulty attribute from the manifest xml, restarted VS and opened package manifest file again which opened this time fine.然后我从清单 xml 中删除了错误的属性,重新启动了 VS 并再次打开了包清单文件,这次可以正常打开。

So, something there seems to have fixed the issue.所以,那里的东西似乎已经解决了这个问题。 Also, I cleaned the deployment inside bin > Debug and re-deployed, which worked this time.此外,我清理了 bin > Debug 中的部署并重新部署,这一次有效。

For me, today, Visual Studio 2022, this happened after adding Badge Logos to the Visual Assets in the App Manifest, for store distribution.对我来说,今天的 Visual Studio 2022 是在将徽章徽标​​添加到应用程序清单中的可视资产之后发生的,用于商店分发。 Apparently, when you add badges it is assumed you are receiving notifications, and you are required to select "Lock screen notifications" in the "Application" tab in the package manifest editor.显然,当您添加徽章时,假定您正在接收通知,并且您需要在包清单编辑器的“应用程序”选项卡中选择“锁定屏幕通知”。 Once you select Lock screen notifications: Badge the error disappears.选择锁定屏幕通知:徽章后,错误就会消失。 Or, remove the Badge Logos if you don't need them.或者,如果您不需要徽章徽标,请移除它们。

I was able to fix it by selecting Lock screen notifications item.我可以通过选择锁定屏幕通知项目来修复它。

在此处输入图像描述

Solution Explorer -> Package.appxmanifest -> right click -> View code -> Find the tag: <mp:PhoneIdentity PhoneProductId="### GUID ###" -> Add property PhonePublisherId="### GUID ###"解决方案资源管理器 -> Package.appxmanifest -> 右键 -> 查看代码 -> 找到标签:<mp:PhoneIdentity PhoneProductId="### GUID ###" -> 添加属性 PhonePublisherId="### GUID ### "

I've added the same ID like my publisher ID我添加了与我的发布商 ID 相同的 ID

Good luck...祝你好运...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM