Failed to set icon for linux build in Visual studio code #755

Open
opened 2026-01-29 16:47:48 +00:00 by claunia · 0 comments
Owner

Originally created by @mazm786 on GitHub (Jan 27, 2022).

Failed to set icon for linux build in Visual studio code. Even default electron icon is not displayed.
OS: Ubuntu 18.04.6 LTS

  • 5.30.1:
  • .net5.0
  • linux:

Procedure 1 Used

.csproj file
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net5.0</TargetFramework> <Description>Proj Server</Description> <IsPackable>true</IsPackable> <ApplicationIcon>build/icons/linux_256x256.png</ApplicationIcon> </PropertyGroup> <ItemGroup> <Content Include="build/icons/linux_256x256.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <EmbeddedResource Include="build/icons/linux_256x256.png" /> </ItemGroup> <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> <ItemGroup> <PackageReference Include="ElectronNET.API" Version="5.30.1" /> </ItemGroup> <ItemGroup> <Content Update="electron.manifest.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> </Project>

Procedure 2 used

electron.manifest.json file where icon file actual path: in build/icons/linux_256x256.png.
Note: I have tried both paths as without directory names and with directory name but no success.
{ "executable": "MyElectronMusicPlayer", "build": { "appId": "com.friasoftit.electron-auto-update", "productName": "Electron Auto Update", "linux": { "category":"Utility", "icon": "linux_256x256.png" } }

Originally created by @mazm786 on GitHub (Jan 27, 2022). Failed to set icon for linux build in Visual studio code. Even default electron icon is not displayed. OS: Ubuntu 18.04.6 LTS <!-- Which version of Electron.NET CLI and API are you using? --> * **5.30.1**: <!-- Which version of .NET Core and Node.js are you using (if applicable)? --> * **.net5.0** <!-- What target are you building for? --> * **linux**: ### **_Procedure 1 Used_** **.csproj file** ` <?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <TargetFramework>net5.0</TargetFramework> <Description>Proj Server</Description> <IsPackable>true</IsPackable> <ApplicationIcon>build/icons/linux_256x256.png</ApplicationIcon> </PropertyGroup> <ItemGroup> <Content Include="build/icons/linux_256x256.png"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <ItemGroup> <EmbeddedResource Include="build/icons/linux_256x256.png" /> </ItemGroup> <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> <ItemGroup> <PackageReference Include="ElectronNET.API" Version="5.30.1" /> </ItemGroup> <ItemGroup> <Content Update="electron.manifest.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> </ItemGroup> </Project>` ### **Procedure 2 used** **electron.manifest.json file** where icon file actual path: in build/icons/linux_256x256.png. Note: **I have tried both paths as without directory names and with directory name but no success.** `{ "executable": "MyElectronMusicPlayer", "build": { "appId": "com.friasoftit.electron-auto-update", "productName": "Electron Auto Update", "linux": { "category":"Utility", "icon": "linux_256x256.png" } }`
claunia added the bug label 2026-01-29 16:47:48 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#755