Skip to content

Separate Product Name and Executable Name #1003

Closed

Description

@AeonSake

Currently, the name of the Electron executable output/artifact is determined by the Title field in the project/publish configuration (fallback to MSBuildProjectName). There is currently also the rather hidden ElectronExecutable field available for further customization, but that only affects the C# binding name for the Electron executable, not the actual output itself.

I would like to propose to make ElectronExecutable the actual executable name (fallback to Title or MSBuildProjectName if needed/for backwards compatibility) and use the Title only for the product name. In the electron-builder configuration, this would mean:

  • Title maps to productName (which I believe it already does right now)
  • ElectronExecutable maps to executableName (which so far used productName)

This way, we could also (theoretically) clean up any illegal file characters without affecting the application title itself.

Activity

  1. AeonSake commented on Jan 2, 2026

    @AeonSake
    ContributorAuthor

    Looking at the package.json template, it looks like only Windows and macOS executables may be affected by this. The Linux executable has a manual overwrite specified to use ElectronPackageId instead. It would still be a good idea to separate the two name types into individual fields rather than using the Title for everything.

  2. softworkz commented on Jan 2, 2026

    @softworkz
    Collaborator

    I would like to propose to make ElectronExecutable the actual executable name

    No. The ElectronExecutable does not control the name of the built executable in the packages. It simply follows what electron-builder is doing and there are only rare cases where you want to change it, like for example when you do some custom package manipulations via electron-builder's build hooks, like for example you could add a stub script to the package and want that to be called by Electron.NET instead of the actual electron executable.

    In other words: If you change ElectronExecutable to a different value, your app would not launch anymore - unless you put something into the package which has that value as its file name.

    That's the reason why it is kind-of hidden.

  3. softworkz commented on Jan 2, 2026

    @softworkz
    Collaborator

    I know that this all looks somewhat messy, but it's electron-builder doing that and we are just following.

  4. AeonSake commented on Jan 2, 2026

    @AeonSake
    ContributorAuthor

    I would like to propose to make ElectronExecutable the actual executable name

    No. The ElectronExecutable does not control the name of the built executable in the packages. It simply follows what electron-builder is doing and there are only rare cases where you want to change it, like for example when you do some custom package manipulations via electron-builder's build hooks, like for example you could add a stub script to the package and want that to be called by Electron.NET instead of the actual electron executable.

    In other words: If you change ElectronExecutable to a different value, your app would not launch anymore - unless you put something into the package which has that value as its file name.

    That's the reason why it is kind-of hidden.

    I know it doesn't control the name right now, but I would like it would do so. As far as I can tell, it's as easy as using the field in the package template instead of leaving it blank as it is right now (electron-builder itself will then fall back to productName).

    I really disagree using the Title field as the executable file name. It will include e.g. also whitespace, which you might want to preserve for the product name but not the file name. That's the exact reason why there even is a manual overwrite for Linux in the template (according to the comment).

  5. AeonSake commented on Jan 2, 2026

    @AeonSake
    ContributorAuthor

    I know that this all looks somewhat messy, but it's electron-builder doing that and we are just following.

    Electron-builder has explicit configuration settings to change the executable file name, but they are not used by the Electron.NET build pipeline as far as I can tell. Since you can specify the electron-builder configuration (or parts of it) also in the generated package.json file, setting the executable file name from the template shouldn't be an issue. And since electron-builder will load package.json first, and merge the separate config file on top, any custom configuration created by users will always win regardless.

  6. softworkz commented on Jan 2, 2026

    @softworkz
    Collaborator

    You're not building and distributing Linux packages, right?

  7. AeonSake commented on Jan 2, 2026

    @AeonSake
    ContributorAuthor

    I've built and maintained several .NET applications for Linux (mainly servers), but never as a Blazor GUI App, no. But that's the main reason I'm using this project in the first place. The dev experience so far has been really great, but the publishing pipeline has been rather frustrating to be perfectly honest. But I'm not sure how that relates to the issue I've proposed. It's literally a setting for the electron-builder itself. Please explain, what the problem with that would be so I can understand it better.

  8. added a commit that references this issue on Sep 4, 2026
  9. added this to the 0.6.0 milestone on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions