I had the exact same problem when I wanted to create an icon for my WinForms program.
The following solution worked for me:
Start creating an icon in i.e. Paint or Photoshop. Make the size preferably 256x256 and 24 bit color. If you use 32 bit color, you won't be able to make the background transparent.
Save your image as .png.
Use your favourite internet browser and enter the page http://iconverticons.com/online/
This page converts your .png into an .ico-file. Since you had an 256x256 input file, the web application is able to create an .ico-file with sizes from 256, 128, 64, 32, 24 and 16 squared.
This icon can then be added to your project by right-clicking your projects name in solution explorer -> Properties -> Application. Under the Resources-field, choose Icon and manifest, and press the three dotted button to the right for the icon-combo box. Browse to your icon-file and choose it.
This will add the icon to your project as you can see when using windows explorer. Note that you have to copy the .exe file from your bin-directory into another directory in order to see the change of icons. This is because the thumbnail icons are not refreshed so easily.
This will, however, not add the icon to your task bar. In order to do that, go to your Form design window, that is where you can change the graphical appearance of your program. Go to properties and choose "Form1" in the combo box. There you will find an option called Icon. By browsing this property to your .ico-file, you can add the icon file to your program and it will appear on the task bar as well.
I hope this works for all of you who wants to add an icon to your project. I will add some descriptive images once I get enough rep.points to enable that :-|