dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.96k stars 4.65k forks source link

What runtime should i get if not desktop? #103749

Closed Sin-Shadow-Fox closed 2 months ago

Sin-Shadow-Fox commented 2 months ago

I was led to believe that to install a version of .NET that i needed the desktop runtime because that is what i was provided with. However when i sought out the desktop runtime for 2.2 and back, i was told there was not desktop runtimes for those. So my question is what runtimes am i supposed to get?

huoyaoyuan commented 2 months ago

I was led to believe that to install a version of .NET that i needed the desktop runtime because that is what i was provided with.

You should not randomly install .NET versions that are not required by your application. The original post that suggests you to install every versions is not a good idea.

However when i sought out the desktop runtime for 2.2 and back, i was told there was not desktop runtimes for those. So my question is what runtimes am i supposed to get?

You should be installing versions prior to 2.2. Each version of .NET works independently. If no application is using certain version, it's encouraged to uninstall the version to reduce attack surface in your machine.

Sin-Shadow-Fox commented 2 months ago

I was led to believe that to install a version of .NET that i needed the desktop runtime because that is what i was provided with.

You should not randomly install .NET versions that are not required by your application. The original post that suggests you to install every versions is not a good idea.

I've had three people tell me i should, including a member of this repository > https://github.com/dotnet/runtime/discussions/103376#discussioncomment-9756558

However when i sought out the desktop runtime for 2.2 and back, i was told there was not desktop runtimes for those. So my question is what runtimes am i supposed to get?

You should be installing versions prior to 2.2. Each version of .NET works independently. If no application is using certain version, it's encouraged to uninstall the version to reduce attack surface in your machine.

attack surface?

huoyaoyuan commented 2 months ago

I've had three people tell me i should, including a member of this repository > #103376 (comment)

It's just an answer to a hypothetic question of "running every possible program on the planet". It's not a possible task in reality at all.

attack surface?

Any component on your computer, that's not actively maintained, can be used by malicious software and attackers. The more things you have, the more ways an attacker can potentially use them.

Sin-Shadow-Fox commented 2 months ago

I've had three people tell me i should, including a member of this repository > #103376 (comment)

It's just an answer to a hypothetic question of "running every possible program on the planet". It's not a possible task in reality at all.

What do you mean?

attack surface?

Any component on your computer, that's not actively maintained, can be used by malicious software and attackers. The more things you have, the more ways an attacker can potentially use them.

But isn't that what anti-virus', VPNs and safe downloading practices are for?

huoyaoyuan commented 2 months ago

Let's go back to your original task, to use Steam console.

DepotDownloader need to run with .NET, so you do need some version of .NET installed. It's configured to be flexible with different versions of .NET, so you are prompt to install the latest version, because it will be just better. However, there's a minimum required version. By inspecting the source code of DepotDownloader, it's requesting .NET 8 or higher. Since .NET 8 is the latest released version, you have the only choice to install .NET 8.

huoyaoyuan commented 2 months ago

But isn't that what anti-virus', VPNs and safe downloading practices are for?

No. A computer connected to the Internet in any way can suffer from attacking. The attacker proactively communicates with your computer and expects it to misbehave for certain communication. A computer must be somehow responsive to enable dual-way communication.

huoyaoyuan commented 2 months ago

I've had three people tell me i should, including a member of this repository > #103376 (comment)

I can't find anyone suggesting you to install every version. Can you cite the exact reply? Everyone marked as Contributor, Member or Collaborator are saying "don't install the version you don't need".

Sin-Shadow-Fox commented 2 months ago

Let's go back to your original task, to use Steam console.

DepotDownloader need to run with .NET, so you do need some version of .NET installed. It's configured to be flexible with different versions of .NET, so you are prompt to install the latest version, because it will be just better. However, there's a minimum required version. By inspecting the source code of DepotDownloader, it's requesting .NET 8 or higher. Since .NET 8 is the latest released version, you have the only choice to install .NET 8.

I shouldn't be surprised you know how to read source code. Though i did find this out after some time > https://github.com/SteamRE/DepotDownloader/discussions/505

Now I'm just waiting on a response from him as to what the people in the first discussion were talking about > https://github.com/SteamRE/DepotDownloader/discussions/505#discussioncomment-9769457

My primary concern right now is .NET compatibility with any future programs i may run into. And how these attack surfaces work. I've been told repeatedly that "well behaving" programs come with the version of .NET that they need but the phrasing of "well behaving" and the fact that what I'm trying to do with steam console required independent download and install of .NET leads me to believe that this is not the case.

But isn't that what anti-virus', VPNs and safe downloading practices are for?

No. A computer connected to the Internet in any way can suffer from attacking. The attacker proactively communicates with your computer and expects it to misbehave for certain communication. A computer must be somehow responsive to enable dual-way communication.

If .NET is such a dangerous thing that can bypass security measures then why does anyone use it? P.S. how do i uninstall a version of .NET and does it include framework?

I've had three people tell me i should, including a member of this repository > #103376 (comment)

I can't find anyone suggesting you to install every version. Can you cite the exact reply? Everyone marked as Contributor, Member or Collaborator are saying "don't install the version you don't need".

1: https://github.com/dotnet/core/issues/7556#issuecomment-2161763895 2: https://github.com/dotnet/runtime/discussions/103376#discussioncomment-9756558 3: https://github.com/dotnet/runtime/discussions/103376#discussioncomment-9769007

huoyaoyuan commented 2 months ago

My primary concern right now is .NET compatibility with any future programs i may run into.

Nobody can tells. If a new program requires some version of .NET, then install that version.

And how these attack surfaces work.

Nobody knows until an attack does happen. An example is WannaCry in 2018.

I've been told repeatedly that "well behaving" programs come with the version of .NET that they need but the phrasing of "well behaving" and the fact that what I'm trying to do with steam console required independent download and install of .NET leads me to believe that this is not the case.

Simple application sometimes doesn't come with installer. DepotDownloader provides a valid instruction to install latest version only.

If .NET is such a dangerous thing that can bypass security measures then why does anyone use it?

Modern security are built by over-defensing at every step, to defend from totally unknown treats. Once a component is out of people's sight, it might be used by some way we didn't mention. In other words, only actively maintained things can be secure. Inactively things are considered insecure by default, without actually knowing how to attack with it.

P.S. how do i uninstall a version of .NET and does it include framework?

Just go to "Uninstall Program" in Control Panel, and find "Microsoft .NET" and "Microsoft .NET Core". Each versions are installed/uninstalled independently.

.NET Framework is different. It's a built-in component of Windows and receives security maintenance together with Windows.

1: dotnet/core#7556 (comment)

This is not a good approach I would suggest.

2: #103376 (comment)

This is a reply for a hypothetical situation of "at least one app somewhere in the world".

3: #103376 (reply in thread)

This is also the reply for hypothetical situation of "It's about the chairs i could realistically own in the future".

We can't predict the future. We can't own anything on the planet either.

Sin-Shadow-Fox commented 2 months ago

My primary concern right now is .NET compatibility with any future programs i may run into.

Nobody can tells. If a new program requires some version of .NET, then install that version.

But how do you tell what version you need if it doesn't tell you?

I've been told repeatedly that "well behaving" programs come with the version of .NET that they need but the phrasing of "well behaving" and the fact that what I'm trying to do with steam console required independent download and install of .NET leads me to believe that this is not the case.

Simple application sometimes doesn't come with installer. DepotDownloader provides a valid instruction to install latest version only.

Really? Where? The instruction i got was:

Step 1 - Installing .NET Core Go to Microsoft's Website [dotnet.microsoft.com] and make sure to download and install the suitable and latest version for your operating system.

Which is what led me to > https://github.com/dotnet/core/issues/7556 and then to > https://github.com/SteamRE/DepotDownloader/discussions/505

If .NET is such a dangerous thing that can bypass security measures then why does anyone use it?

Modern security are built by over-defensing at every step, to defend from totally unknown treats. Once a component is out of people's sight, it might be used by some way we didn't mention. In other words, only actively maintained things can be secure. Inactively things are considered insecure by default, without actually knowing how to attack with it.

I don't know what this means.

P.S. how do i uninstall a version of .NET and does it include framework?

Just go to "Uninstall Program" in Control Panel, and find "Microsoft .NET" and "Microsoft .NET Core". Each versions are installed/uninstalled independently.

Capture The ones at the bottom, above mining mechs?

2: #103376 (comment)

This is a reply for a hypothetical situation of "at least one app somewhere in the world".

3: #103376 (reply in thread)

This is also the reply for hypothetical situation of "It's about the chairs i could realistically own in the future".

Both of these were in response to my question > https://github.com/dotnet/runtime/discussions/103376 Which i assure you was not hypothetical. I asked this question to learn what i realistically needed.

huoyaoyuan commented 2 months ago

But how do you tell what version you need if it doesn't tell you?

There are other mechanisms. By default, a .NET application will try to show an error message about what version is required and where to download.

Step 1 - Installing .NET Core Go to Microsoft's Website [dotnet.microsoft.com] and make sure to download and install the suitable and latest version for your operating system.

Which is what led me to > dotnet/core#7556 and then to > SteamRE/DepotDownloader#505

Yes their instruction is not very clear. .NET Core has rebranded into .NET, and the "suitable' version for it is just the "base" .NET Runtime, without Windows Desktop or ASP.NET.

I don't know what this means.

Every software is considered bad by default. More is just worse when you are not using them.

The ones at the bottom, above mining mechs?

The only "Microsoft Windows Desktop Runtime" ones.

Both of these were in response to my question > #103376 Which i assure you was not hypothetical. I asked this question to learn what i realistically needed.

You are asking for predicting the future about what you would need to run. Nobody can do. And also, newer versions of .NET will release. An application you need in the future can depend on a .NET version in the future.

CyrusNajmabadi commented 2 months ago

As stated several times in the other thread, you only need the versions of .net that your apps require.

We explained this with the screwdriver analogy. You then said you might have to use every chair ever. In which case, you'd need every screw driver ever.

But no one has worked on your use case being nice because no one has ever needed to make every chair ever made (both into the past and into the future).

The instructions so far hasn't been pretty clear. Install the versions of .net your apps require. That is clear and doable.

Sin-Shadow-Fox commented 2 months ago

But how do you tell what version you need if it doesn't tell you?

There are other mechanisms. By default, a .NET application will try to show an error message about what version is required and where to download.

Step 1 - Installing .NET Core Go to Microsoft's Website [dotnet.microsoft.com] and make sure to download and install the suitable and latest version for your operating system.

Which is what led me to > dotnet/core#7556 and then to > SteamRE/DepotDownloader#505

Yes their instruction is not very clear. .NET Core has rebranded into .NET, and the "suitable' version for it is just the "base" .NET Runtime, without Windows Desktop or ASP.NET.

Then why did it specify "for your operating system"? Also what is "base" .NET?

I don't know what this means.

Every software is considered bad by default. More is just worse when you are not using them.

Then i reiterate my previous question. If every version of .NET is "bad by default" then why don't people switch to something else?

The ones at the bottom, above mining mechs?

The only "Microsoft Windows Desktop Runtime" ones.

Uninstallation complete! I left the 8.06 version for obvious reasons.

Both of these were in response to my question > #103376 Which i assure you was not hypothetical. I asked this question to learn what i realistically needed.

You are asking for predicting the future about what you would need to run. Nobody can do. And also, newer versions of .NET will release. An application you need in the future can depend on a .NET version in the future.

Actually I'm just asking for people's experience. Are older versions of .NET common enough to need to have older version installed and if so which ones. Everyone can share their experience and personal opinions and that's the core of what I asked.

P.S. As a side note, I'd like to ask why several people on github seem to be very hateful to people like me when we come here. Almost every time I've come to this website (github) to ask a question or solve a problem, I've run into people that are just hateful and want to condemn me for it. A good example would be https://github.com/dotnet/runtime/discussions/103376#discussioncomment-9756407 where julealgon condemns me for not doing the very thing that I'm doing in that very discussion and then says I'm disrespectful and dismissive for apologizing for my ignorance. I don't even understand what he's saying but three other people have already thumbed up his comment. Hell my last comment here has already received a thumbs down from someone called neon-sunset. I don't understand if this is some kind of anti-education culture that's unique to github or if it's some form of elitism. If you could shine any light on this, I would appreciate it as the last thing i want to do is make people angry.

Sin-Shadow-Fox commented 2 months ago

As stated several times in the other thread, you only need the versions of .net that your apps require.

We explained this with the screwdriver analogy. You then said you might have to use every chair ever. In which case, you'd need every screw driver ever.

The screwdriver/chair analogy is what made it seem like i needed every version. So from my perspective I'm being told one thing while every example people are giving me to explain it to me makes it seem like the opposite is true.

The instructions so far hasn't been pretty clear. Install the versions of .net your apps require. That is clear and doable.

And my other post was to gleam knowledge and experience from people like you as to what versions of .NET would most likely be required based on how prolific they are and how likely it would be to come across. Contrary to what julealgon seems to believe (i think), i did come here to understand.