Electron.net: default Electron icon is used reason=application icon is not set

Created on 16 Jul 2019  路  5Comments  路  Source: ElectronNET/Electron.NET

  • ElectronNET.API 5.22.13, netcoreapp2.2, electron-builder version=20.44.4, node 10.10.0:

  • Target: windows

I use the win/icon option to add my own app icon:

    "win": {
      "icon": "Assets/icon.ico"
    },

electron-builder keeps logging:

default Electron icon is used reason=application icon is not set

I also tried ElectronNET.WebApp which gives the same message.

bug

Most helpful comment

Its probably not a bug. It took me aaages to get it to work. If you don't get the path to your icon correct from the "current working folder" it defaults to the electron icon and you get that message. Take a look at this repo and the electron.manifest.json there. Determine the path to icon.png and compare to your own settings.

All 5 comments

Its probably not a bug. It took me aaages to get it to work. If you don't get the path to your icon correct from the "current working folder" it defaults to the electron icon and you get that message. Take a look at this repo and the electron.manifest.json there. Determine the path to icon.png and compare to your own settings.

@robalexclark thank you so much! This fixed it. I created a pull request to fix it in the example aswell.

For anyone else hitting this I found that I had to prefix the directory with bin to get it to work:

"win": {
      "icon": "bin/Assets/favicon.ico"
    },

My project did not work with an ICO file. Converting it to PNG worked instead. Maybe the fact, that the ICO had two embedded resolutions broke the feature?

Electron-builder is used to integrate the icon. In the electron.manifest.json file, the entire build part is the 1:1 configuration of electron-builder. Best for problems, google for electron builder and icons...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdespinosaagmx picture cdespinosaagmx  路  3Comments

litch0 picture litch0  路  4Comments

AykutToprak picture AykutToprak  路  4Comments

robalexclark picture robalexclark  路  6Comments

iqmeta picture iqmeta  路  3Comments