Skip to content

Ability to override target framework in ElectronDevMode #1095

Closed

Description

@epsnm

Electron.NET is targeting multiple frameworks, including deprecated ones.

While using ElectronDevMode we might use it as a submodule of an existing product where only some targets are available.

In order to enhance developer experience, add the ability to overload the target framework from the Directory.Build.props barrier.

In addition, this will solve the Visual Studio message 'This project is targeting a version of .NET that is not installed' for solutions without multiple target frameworks.

Activity

  1. epsnm commented on Aug 7, 2026

    @epsnm
    ContributorAuthor

    @FlorianRappl You can assign it to me if you agree

  2. FlorianRappl commented on Aug 7, 2026

    @FlorianRappl
    Collaborator

    Can you give an example of a project where this might help / what would be necessary to support the case properly?

  3. epsnm commented on Aug 10, 2026

    @epsnm
    ContributorAuthor
    • Some companies have restrictions about installing no longer supported .NET versions and automatically remove them.
    • This will help to easily switch to the new target framework for early testing.
  4. FlorianRappl commented on Aug 10, 2026

    @FlorianRappl
    Collaborator

    I still don't see it. Just change the target framework in your project file? What am I missing here?

    It seems this is more a problem of the project using Electron.NET than of Electron.NET.

  5. epsnm commented on Aug 10, 2026

    @epsnm
    ContributorAuthor

    Because of the Directory.build.props barrier, changing TFM in my repository will not be reflected in the Electron.NET directory.

    I need to be able to change or restrict the TFM in a centralized manner, without doing any change in our forked repository of Electron.NET

    I'm not saying there are no other options, but having a way to customize TFM is more convenient for our solution. As it only adds the possibility to override, actual behavior is unchanged.

  6. epsitec commented on Aug 10, 2026

    @epsitec

    This would indeed be helpful ☺️

  7. FlorianRappl commented on Aug 10, 2026

    @FlorianRappl
    Collaborator

    So what you are talking about is development convenience for sb. developing Electron.NET instead of somebody using Electron.NET.

    Because the last group is who we actively target and should put effort in - the former is just ourselves. And for the former - why don't you just change the TFM since you have it locally anyway? You can make any change you like.

    Maybe I still don't get it - but I don't see what benefits we would have here (as a user the TFM you set for your application is also the TFM that will be used for your deps incl. Electron.NET).

  8. epsnm commented on Aug 12, 2026

    @epsnm
    ContributorAuthor

    So what you are talking about is development convenience for sb. developing Electron.NET instead of somebody using Electron.NET.

    Yes, with the idea in mind that somebody using Electron.NET as an end-user might become a contributor at some point. Therefore, enhancing DX is not worthless.

    Because the last group is who we actively target and should put effort in - the former is just ourselves. And for the former - why don't you just change the TFM since you have it locally anyway? You can make any change you like.

    We want to use the upstream version to avoid drifting to a custom fork. This change might not seem like a lot, but it opens Pandora's box of having a patched version and will challenge us to avoid drifting on the long run.

    Here are the changes if you want to have a look.

  9. FlorianRappl commented on Aug 12, 2026

    @FlorianRappl
    Collaborator

    Yes, for me this is fine. It's generally good, too, as its a single-source for modification of the TFM.

    So yes - please create a PR.

  10. added this to the 0.6.0 milestone on Aug 12, 2026
  11. added a commit that references this issue on Aug 14, 2026
  12. added a commit that references this issue on Aug 14, 2026
  13. FlorianRappl commented on Sep 3, 2026

    @FlorianRappl
    Collaborator

    Any update on this one?

  14. epsitec commented on Sep 3, 2026

    @epsitec

    Samuel is on vacation and will be getting back to you by mid-September.

  15. modified the milestones: 0.6.0, 1.0.0 on Sep 3, 2026
  16. epsnm commented on Sep 22, 2026

    @epsnm
    ContributorAuthor

    Solved by #1104

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions