0

Yes I did my homework first. And I'm still stuck. First let me express my irritation at Microsoft for deprecating the Installer project type. Shame on them.

Back to my issue, Here is the error:

Error   3   -3204: Cannot extract icon with index 0 from file <some_path>\obj\Debug\MyProject.Gui.exe.

Attempt #1: InstallShield: cannot extract icon with index 0 vb.net

-- The answer says to include an object of type icon in my exe and rebuild. To do this, I tried the following:

  1. right clicked on my windows forms project, add new item, icon, save all

  2. open the icon file in step 1, draw some text in it, save all

  3. right click the project and select rebuild (no errors, looks good)

  4. left click on 'Specify Application Data'->'Files', select the *.ico in the project (Note: I can see it clearly listed, and it appears in the dialog as index0)

  5. left click on 'General Information'-> 'Display Icon' -> browse for the *.ico (located in project folder for MyProject.Gui.exe)

  6. save all and rebuild all

...I still get the same error message.

How does one "Recompile your EXE to include an icon and the message will go away"?

Alec
  • 31,829
  • 7
  • 67
  • 114
sapbucket
  • 6,795
  • 15
  • 57
  • 94

6 Answers6

13

I had the same issue. Your problem is because you need to embed the icon into your executable. The way you do this is in Project Properties window in Visual Studio (Alt-Enter or right click ->properties for project root in solution explorer).

In the project properties under Application, there's a group box called Resources. Add your icon as shown below and install shield will build fine.

Hope that helps.

enter image description here

timmit
  • 181
  • 1
  • 6
  • 1
    This worked for me. And I'd also like to say, Damn M$ for Deprecating Setup Project. InstallShield Limited looks nice but I dont need all the fancies of it. – Encryption Aug 01 '13 at 19:20
  • Thanks - I had everything right except the manifest setting which was set to "app.manifest". Changing it to what's in your image solved the problem. – Laurence Frost Nov 19 '15 at 11:13
3

I was getting this problem, I try a lot of solutions on the web, but the only way that works for me:

  1. Expand the deploy solution (+) on the right panel (Solution Explorer)
  2. Expand the menu "Configure the target system"
  3. Double click on Shortcuts folder
  4. Here you will find 2 output you set up in the project wizard.
  5. Select one of them, and find the property Icon, click to (...) to browse the propertly icon.
  6. Do the same with the second one output built solution.
  7. Rebuild your project!

Regards,

saviiles
  • 571
  • 6
  • 4
1

You need to copy the icon file to the debug folder of your windows application to successfully compile.

1
  1. Go to Shortcuts/Folders under configure the Target System.

enter image description here

  1. Select your application from the tree.
  2. Select the icon and change the index to 2 (or something other than 0) enter image description here
  3. Build it.
chandudab
  • 105
  • 3
0

If the problem is that you associated the icon with the installer and you embedded it into your application but you are still getting this error, try adding a folder exception to your antivirus software. The exception should be the folder where your source is located and the executable is output.

The symptom is that you randomly get this error during a build. It is caused by your antivirus software preventing the installshield icon extractor from accessing your application executable.

0

This happened with me also. My application runs in the background so I didn't create an Icon for it. When this error occurred I assigned an icon and everything built okay.

BartoszKP
  • 34,786
  • 15
  • 102
  • 130
Tilting Code
  • 137
  • 1
  • 3
  • 13