Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API Proposal]: Compiled framework-dependent .exe should automatically download and install appropriate runtime #16171

Open
ctigrisht opened this issue Apr 18, 2023 · 9 comments
Assignees

Comments

@ctigrisht
Copy link

Background and motivation

Hey,
So I come across a big problem that a lot of people I know complain about: Bundle size of self-contained executables.
These can reach upwards of 80 MB for a decently sized app, and that can be a huge problem, more bandwidth use, and entirely removes the benefit of having a shared system runtime that other apps can use.

My proposal is that the compiled framework-dependent executable includes an auto-installer for the runtime, as this would make my (example) 80 MB app just 15-20 MB.
AOT and trimming are not always an option, and I would much prefer a shared runtime as .NET is "intended" to be used.

API Proposal

When the user starts the .net .exe, if the runtime is not installed, they should be met with a prompt to automatically install dependencies on the system

API Usage

none

Alternative Designs

No response

Risks

No response

@filipnavara
Copy link
Member

There are existing third party solutions for that problem: https://github.com/Tyrrrz/DotnetRuntimeBootstrapper

@ctigrisht
Copy link
Author

ctigrisht commented Apr 18, 2023

There are existing third party solutions for that problem: https://github.com/Tyrrrz/DotnetRuntimeBootstrapper

Why not support it directly within .NET and reduce reliance on third party software, considering their license is a little bit overboard... I do not want to use such a software with a politicized license.

You condemn Russia and its military aggression against Ukraine
You recognize that Russia is an occupant that unlawfully invaded a sovereign state
You support Ukraine's territorial integrity, including its claims over temporarily occupied territories of Crimea and Donbas
You reject false narratives perpetuated by Russian state propaganda

Just this license alone makes it much less appealing (I don't support russia).
These kinds of licenses are a gateway to vulnerabilities, what if the source code suddenly contains malware that will wipe a computer if it connects from a Russian IP (such as an infamous NodeJS package).

So from my point of view and my company's, it is unacceptable to use a software with such a license.

I know other repos exist and I am not saying they are bad. But a 1st party solution that doesn't require bundling but rather directly integrated into .NET would be a good thing.

I don't think it is hard to implement, you just have to write some code that detects the runtime, and if no runtime is installed for this version, prompt to download, and refresh PATH.

@ghost
Copy link

ghost commented Apr 20, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Background and motivation

Hey,
So I come across a big problem that a lot of people I know complain about: Bundle size of self-contained executables.
These can reach upwards of 80 MB for a decently sized app, and that can be a huge problem, more bandwidth use, and entirely removes the benefit of having a shared system runtime that other apps can use.

My proposal is that the compiled framework-dependent executable includes an auto-installer for the runtime, as this would make my (example) 80 MB app just 15-20 MB.
AOT and trimming are not always an option, and I would much prefer a shared runtime as .NET is "intended" to be used.

API Proposal

When the user starts the .net .exe, if the runtime is not installed, they should be met with a prompt to automatically install dependencies on the system

API Usage

none

Alternative Designs

No response

Risks

No response

Author: ctigrisht
Assignees: -
Labels:

area-Host, untriaged

Milestone: -

@vitek-karas
Copy link
Member

I know the experience has been somewhat lacking in the past, but I think we've made some great improvements recently. For example: dotnet/runtime#78087

@ctigrisht
Copy link
Author

I know the experience has been somewhat lacking in the past, but I think we've made some great improvements recently. For example: dotnet/runtime#78087

I agree that it is already an improvement, but auto-installing and refreshing path would be a huge step forward.

@davidfowl
Copy link
Member

Does .NET Framework do that?

@ctigrisht
Copy link
Author

Does .NET Framework do that?

NetFX is a part of windows updates/features as far as I know, most of the times the runtime is already on the machine or it can be enabled easily.

@agocke
Copy link
Member

agocke commented Apr 20, 2023

Moving to installer, as this is more a question of product acquisition. .NET currently doesn't have a "net installer"

@agocke agocke transferred this issue from dotnet/runtime Apr 20, 2023
@marcpopMSFT
Copy link
Member

Old issue triage: More acquisition feedback for ashnaga to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants