I tried the following to set my custom icon for Electron.Net application (it is a Blazor application). I tried pretty much any absolute path / relative path combination I could think of, nothing helped...
For some reason, the icon (both in main window as in Task bar) keeps using the default icon... I tried pretty much any configuration but nothing seems to help... Maybe it is my MyIcon.ico
icon that is at fault here? Does it need to be of specific resolution, or anythig?
Strange is - the splash image is showing... What am I doing wrong here?! (ps: for now I am only trying to build electron for Windows)
Here my electron.manifest:
{
"executable": "MyFirstApp",
"splashscreen": {
"imageFile": "/wwwroot/Images/MySplash.png"
},
"name": "MyApp",
"author": "Me",
"singleInstance": false,
"environment": "Production",
"build": {
"appId": "com.MaApp.app",
"productName": "MyApp",
"copyright": "Copyright © 2020",
"buildVersion": "1.0.18",
"win": {
"icon": "wwwroot/Images/MyIcon.ico"
},
"compression": "maximum",
"directories": {
"output": "../../../bin/Desktop"
},
"extraResources": [
{
"from": "./bin",
"to": "bin",
"filter": [ "**/*" ]
}
],
"files": [
{
"from": "./ElectronHostHook/node_modules",
"to": "ElectronHostHook/node_modules",
"filter": [ "**/*" ]
},
"**/*"
]
}
}
Commenting to say make sure your copy to output directory is set correctly in Visual Studio if you are putting the icon in a different folder like Assets.
I have my path set like so
"win": { "icon": "bin/Assets/icon.png" },