有了“清单依赖”,为什么我不能简单地使用星号作为通配符?

问题描述

通常,当您在 Visual Studio 中创建新的基于 C++ 的应用程序时,您会从模板中获得类似以下内容的内容:

#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif

有人可以解释为什么一方面我需要对 processorArchitecture 属性进行区分,但是如果它既不是 x86-32 也不是 x86-64,它会回退到 * (通配符,它似乎)无论如何。

为什么不完全使用通配符?例如,当存在回退并且 the documentation 似乎没有说明为什么我应该尽可能具体时,具体说明 processorArchitecture 有什么好处?


额外的(子)问题:文档特别指出(强调我的):

processorArchitecture 指定处理器。 有效值包括 x86amd64armarm64 可选。

因此,根据此 VS 模板创建的通配符值甚至无效。

但鉴于它是可选的,为什么我不能简单地将 processorArchitecture 关闭?而且,假设我可以:processorArchitecture='*' 和不使用它之间是否存在语义差异?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)