1

I'm reading a book from Mark J Price, where he states:

  • Since .NET Framework 4.5.2, it has been an official component on the Windows operating system.

vs

  • .NET Core is fast-moving and because it can be deployed side by side with an app, it can change frequently.

I don't really get this. Whether I use one or the other, I do still need to install the SDK and runtime for both of them? So what does he mean?

Stefan
  • 17,448
  • 11
  • 60
  • 79
Maarten Vissers
  • 499
  • 1
  • 4
  • 11
  • You only need an SDK if you are doing software development. – Neil Mar 02 '22 at 19:08
  • [What's the difference between .NET Core, .NET Framework, and Xamarin?](https://stackoverflow.com/questions/38063837/whats-the-difference-between-net-core-net-framework-and-xamarin) – gunr2171 Mar 02 '22 at 19:09
  • [When does the .NET framework need to be installed on a client machine?](https://stackoverflow.com/questions/32981707/when-does-the-net-framework-need-to-be-installed-on-a-client-machine) [Do .NET Core apps require the .NET runtime installed on the target machine?](https://stackoverflow.com/questions/32037695/do-net-core-apps-require-the-net-runtime-installed-on-the-target-machine) – gunr2171 Mar 02 '22 at 19:09
  • You can create executables that require .NET Core (or later) installed, but you can also publish a single file which contains everthing needed to run the program. That can be rather large if it needs to include a lot of .NET, but the size varies a lot. – Matthew Watson Mar 02 '22 at 19:14

1 Answers1

2

In all cases you only need the (partial) runtime to run, not the SDK. The SDK is only for development.

As for the rest:

  • on some operating systems a .net version is available by default. These versions can change beteen OS (Windows) versions. You'll need to see which version is applicable for you.
  • .net core (and it's follow up .net 5+) is not always standard available on the OSses. But .net core (and .net 5+) offers the ability to include the required runtime components in the build. This will increase your build by approx. 140 MB, but you can be sure you have all the required prerequisites.

You can pick whatever suits you best but be aware of the end-of-life-dates of the framework: .net, .net core, .net 6+.

For version 4.5.2 specific:

.NET Framework 4.5.2, 4.6, and 4.61 retire on April 26, 2022.

So I wouldn't start developing new applications with that version.

As mentioned by @MAtthewWatson, more info on the single file publishing (which includes the runtime), see: this link.

Captured image in case the link will change:

enter image description here

enter image description here

Stefan
  • 17,448
  • 11
  • 60
  • 79
  • 1
    For more detailed information on single-file publishing: https://github.com/dotnet/designs/blob/main/accepted/2020/single-file/design.md – Matthew Watson Mar 02 '22 at 19:16