我刚开始使用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"/>
更多推荐
发布评论