Is it possible to make a C# app WITHOUT the user needing to have .NET?

ateryu

New member
Joined
Nov 28, 2024
Messages
1
Programming Experience
1-3
I don't really understand this. If I select to create a single executable file, then the file does not include necessary components for .NET, meaning that if a user who does not have .NET tries to run the app, it tells them they need to install .NET to run it. And I've found a solution to this is to include the entirety of .NET in the application which makes the .exe file size huge also it does fix the issue I just described.

However, is that really necessary? If I want to make a WinForms app is there any way to do that without the user needing to install anything or without me needing to make the exe file size huge?
 
See:
 
C# is just a language. The framework is the set of libraries that let's you interact with the OS or implement some well known algorithms without having to roll your own solution. Like a lot of the modern languages, some C# language features are also dependent on the framework. So basically you can't escape having to drag in the framework into your single executable. If you minimize your depencies on the framework, then you can minimize the size of your executable.

You seem to be expecting to create some something like 100KB Win32 program and just ship that 100KB .EXE to your other Windows using friends. Do you have that expectation of just also shipping 100KB to your Mac and Linux using friends without them having to install about 8GB other stuff that emulates Windows on their OS? If you say "of course not" , then why have expectations of your .NET dependent code being able to run on other Windows machine which don't have .NET?
 
Back
Top Bottom