Wix无法解析符号“图标”(Wix cannot resolve symbol “Icon”)

编程入门 行业动态 更新时间:2024-10-23 17:36:19
Wix无法解析符号“图标”(Wix cannot resolve symbol “Icon”)

我刚开始使用WiX 3,无法弄清为什么它无法理解我的.wsx文件中的图标属性。 我收到错误消息:

错误2在'产品:{95DB18C7-24DC-474D-B58C-DC91AFD912F3}'部分中未解析对符号'Icon:Sample.exe'的引用。

它抱怨的部分是:

<Shortcut Id="startmenuSample" Directory="ProgramMenuFolder" Name="Sample 1.0" WorkingDirectory='INSTALLDIR' Icon="Sample.exe" IconIndex="0" Advertise="yes" />

如果我评论这部分,安装程序工作正常。

I'm just starting out with WiX 3 and can't figure out why it can't understand the Icon attributes in my .wsx file. I get the error message:

Error 2 Unresolved reference to symbol 'Icon:Sample.exe' in section 'Product:{95DB18C7-24DC-474D-B58C-DC91AFD912F3}'.

The section it is complaining about is:

<Shortcut Id="startmenuSample" Directory="ProgramMenuFolder" Name="Sample 1.0" WorkingDirectory='INSTALLDIR' Icon="Sample.exe" IconIndex="0" Advertise="yes" />

If I comment that section out, the installer works fine.

最满意答案

该错误消息试图告诉您Shortcut / @ Icon属性正在引用具有Id属性=“Sample.exe”的Icon元素。 但是,图标元素不存在。 应该有一个行号,以帮助您找到参考。

无论如何,你需要类似的东西

<Icon Id="Sample.exe" SourceFile="your.ico"/>

The error message is trying to tell you that the Shortcut/@Icon attribute is referencing an Icon element with Id attribute = "Sample.exe". However, the Icon element does not exist. There should have been a line number in there to help you find the reference.

Anyway, you need something like

<Icon Id="Sample.exe" SourceFile="your.ico"/>

更多推荐

本文发布于:2023-08-07 07:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1462361.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图标   符号   Wix   Icon   symbol

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!