Electron default icon missing on Linux (ubuntu 18.04.6 TLS)
Electron default icon missing on Linux (ubuntu 18.04.6 TLS)
- 13.5.1:
net 5.0
- Linux (ubuntu 18.04.6 TLS):
While custom icon setting also failed.
Try 1 (Startup.cs file)
var options = new BrowserWindowOptions { Icon=$"./icon.ico", WebPreferences = new WebPreferences { WebSecurity = false } };
Try 2 (Startup.cs file)
var options = new BrowserWindowOptions { Icon=$"linux_256x256.png", WebPreferences = new WebPreferences { WebSecurity = false } };
Try 3 (Electron.manifest.json file)
{ "executable": "MyElectronMusicPlayer", "build": { "appId": "my.app", "productName": "Electron Music Player", "linux": { "category":"Utility", "icon": "linux_256x256.png" } } }
@mazm786 the proper way to do it is documented in the electron-builder spec here. I can't tell right off the bat but I think your try 3 is the correct approach. However there is a gotcha that can occur... around pathing due to the electron-builder command not occuring where you might expect it to occur. here is the working path I'm using for my app.
{ "build" : {
"linux": {
"icon": "../../../../../build/assets/512x512.png",
...
} } }
here is my file structure .. if you notice.. there are a couple extra ../s in my path given this file structure
/
/build/assets/512x512.png
/src/myapp/myapp.csproj
/src/myapp/electron.manifest.json
I believe the extra ../s are to account for the electron app actually being built in a deeper folder by electronize. not really clearly documented or documented at all but this was my trial and error outcome.
Isn't this a duplicate basically of #659 ?
It should be said that custom icons in the taskbar won't appear if you're just using electronize start but will appear in the published version
🎉🚀 New Electron.NET version 23.6.1 released 🚀🎉
With native Electron 23 and .NET 6 support. Your problem should be fixed here. If you continue to have the problem, please let us know. Please note the correct updating of your API & CLI. Info in the README. Have fun!