gpt4 book ai didi

visual-studio - 将所有图像添加到 Package.AppXManifest 会导致编译器警告

转载 作者:行者123 更新时间:2023-12-04 23:57:41 24 4
gpt4 key购买 nike

我已指定 win8_logo_small.png用于 Package.appxmanifest 中的“小标志”我的 Windows 8 Store 项目的设置。当我创建商店包时,我收到此警告:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\AppxPackage\Microsoft.AppXPackage.Targets(1052,9):
warning APPX1621: A mixture of images matching logical name 'win8_logo_small.png' exists
in this project with and without the "scale" or "targetsize" qualifier specified.
For predictable runtime behavior, explicitly specify the scale or target size
in each image asset's file name.

虽然这只是一个警告,但我想知道微软希望我怎么做,因为图像比例变体的名称是自动生成的:
win8_logo_small.scale-80.png
win8_logo_small.scale-100.png
...
win8_logo_small.targetsize-16.png
win8_logo_small.targetsize-32.png

如果我重命名 xxx.targetsize文件到类似 xxx.scale-###.png并将其添加到项目中,Visual Studio 会自动将文件复制到 xxx.targetsize-##.png !

这是可以解决的事情吗?它需要解决还是只是 Windows RT 包编译器中的一个错误?

最佳答案

scale 和 targetsize 图像应该是互斥的。来自 How to name resources using qualifiers

The targetsize qualifier can specify resources at a particular size (in pixels). It is primarily used to specify file type association icons or protocol icons shown in the desktop Windows Explorer. This qualifier is typically used for square images or icons and specifies only a single image dimension. The system or app requesting the resource (ResourceContext.QualifierValues) must explicitly specify a targetsize. There is no default. If you use the targetsize qualifier on a resource, you should not use the scale qualifier.



Visual Studio 可能对此更清楚一点,同意,因为应用程序 list UI 暗示您可以/应该提供所有这些。

关于visual-studio - 将所有图像添加到 Package.AppXManifest 会导致编译器警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15067357/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com