Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wix cannot resolve symbol "Icon"

Tags:

wix

wix3

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.

like image 208
Eric J. Avatar asked Aug 05 '09 02:08

Eric J.


2 Answers

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"/>

like image 98
Rob Mensching Avatar answered Sep 24 '22 13:09

Rob Mensching


If you mark the shortcut as "Advertise=yes", then the icon is not available yet because your app is not yet installed, only advertised.

You have to include the icon directly in the msi, not in the advertised exe. Or set "Advertise=no".

like image 20
Stefan Avatar answered Sep 22 '22 13:09

Stefan