electron-builder: appx - wrong icon / how to set assets

  • Version: 10.6.1
  • Target: appx (32/64)

When building for windows store the icon.ico isn’t used in a couple places. E. g. the installed software list shows a default electron icon. Start menu as well. I found those default icons in assets. I haven’t yet figured out how to use my own icon for those assets.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (15 by maintainers)

Commits related to this issue

Most upvoted comments

For the icons here’s what I had to (thanks to Matteo Pagani from Microsoft):

For the assets:

  • get the VS plugin
  • create a new universal app project in VS 2015
  • remove the existing assets
  • drop your own icon into assets (400x400 or bigger)
  • rightclick your icon, select generate assets

If you have your assets:

  • unpack the electron-builder-generated appx
  • copy your own assets into the unpacked assets folder
  • edit the manifest:
    • set Applications.Application.VisualElements.BackgroundColor to transparent
    • set Applications.Application.VisualElements.Square150x150Logo to assets\Square150x150Logo.png
    • Square44x44 and Wide310x150 analogue
    • set Properties.Logo to assets\NewStoreLogo.png
  • now open the VS2015 native cmd (x86 for 32bit / x64 for 64bit)
  • navigate to the unpacked files
  • run makepri createconfig /cf priconfig.xml /dq en-US /pv 10.0.0 (for win10)
  • run makepri new /pr . /cf priconfig.xml
  • cd ..
  • run `makeappx pack -d “.\your_unpacked_files” -p “name_of_the_appx.appx” -l
  • and optionally sign signtool.exe sign -f path\to\your\cert.pfx -fd SHA256 -v .\name_of_the_appx.appx

Key was the -l (or /l) option for makeappx.exe plus the generated unplated asset versions.


That’s quite a bunch of steps. I fear I have no time this year left to work on this 😐 Guess I’ll start with adding the props to the manifest.

Okay fixed I’m just a bad person who doesn’t read the doc properly. The issue was that for a resource named “SampleAppx.44x44.png”, I created a SampleAppx.targetsize-44_altform-unplated AND a SampleAppx.targetsize-44.png.

So, two things here

  1. The name is wrong -> for SampleAppx.44x44.png you should create a file named SampleAppx.44x44.targetsize-44_altform-unplated.png

  2. You only need the targetsize-44_altform-unplated.png file and not the targetsize-44.png file

Ref link: https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-manual-conversion

Also there’s some manual steps that have to be done in order to publish the appx in the Windows Store. Maybe we can automate these, too. There’s four fields in the manifest that need to be set:

  • Package.Identity.Name
  • Package.Identitiy.Publisher
  • Package.Properties.DisplayName
  • Package.Properties.PublisherDisplayName

Publisher is already correctly set (CN=…). PublisherDisplayName was correct in my case, too. There might be cases where someone needs to set a different one. I’d say we add an option for each of the remaining three fields. Maybe .build.win.appx.identitiy.name (default author.display name without whitespaces), .build.win.appx.properties.displayName (default productName) and .build.win.appx.properties.publisherDisplayName (default author)?

@develar Shall I open a new issue? Option names okay? I would try to file a PR for this. Doc would also need an update of course.

I haven’t fixed the asset thing yet.