installer icon indicating copy to clipboard operation
installer copied to clipboard

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

Open ctigrisht opened this issue 1 year ago • 9 comments

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

ctigrisht avatar Apr 18 '23 06:04 ctigrisht

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

filipnavara avatar Apr 18 '23 07:04 filipnavara

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.

ctigrisht avatar Apr 18 '23 08:04 ctigrisht

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: -

ghost avatar Apr 20 '23 03:04 ghost

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

vitek-karas avatar Apr 20 '23 08:04 vitek-karas

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.

ctigrisht avatar Apr 20 '23 08:04 ctigrisht

Does .NET Framework do that?

davidfowl avatar Apr 20 '23 08:04 davidfowl

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.

ctigrisht avatar Apr 20 '23 09:04 ctigrisht

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

agocke avatar Apr 20 '23 17:04 agocke

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

marcpopMSFT avatar Sep 17 '24 20:09 marcpopMSFT