What is the difference between * which version of the framework works * and *, which version of the runtime * *?

In this post, @kbrimington mentions that there is a subtle difference between the framework version and the runtime version.

What is the difference?

+4
source share
4 answers

Here is a brief breakdown that can give you the information you need. This can be confusing, but it is worth the time to understand the difference between all three and how they differ from each other.

CLR .NET C# ---- ---- ---- 1.0 1.0 1.0 1.0 1.1 1.0 2.0 2.0 2.0 2.0 3.0 3.0 2.0 3.5 3.0 4.0 4.0 4.0 4.0 4.5 5.0 
+6
source

The .NET structure is a structure that describes the available classes. Thus, the framework version tells you which classes are available.

The runtime environment (CLR) is the part that executes the code; it is a virtual machine that translates the compiled application (MSIL) into byte code that can be executed on the host OS.

+5
source

When developing in Visual Studio 2008 or 2010, you can choose which version of .Net to use. This is called multi-targeting , as described here and here :

Visual Studio's multi-targeting feature lets you specify the specific version or profile of the .NET Framework that is required for your application. A key benefit of multi-targeting is that you can use the current version of Visual Studio to create and develop projects that target an earlier version of the .NET Framework. For example, you can continue to develop projects created in Visual Studio 2005 and Visual Studio 2008 without adding new .NET Framework dependencies. Multi-targeting helps ensure that applications use only the features that are available in the specified version of the .NET Framework. In addition, multi-targeting allows you to continue deploying old applications without requiring you to add a new version of the .NET Framework to the deployment package.

An application compiled on .Net 3.5 in Visual Studio 2008 will use a different version of the runtime from the same application compiled on .Net 3.5 in Visual Studio 2010.

This means that when you maintain or improve applications written in older versions of .NET or Visual Studio, you can still do this development in the new version of Visual Studio, using the new features.

+1
source

The important thing is that the .NET version is installed side by side or updates the existing version. Verions 1.0, 1.1, 2.0, and 4.0 are side by side versions. 3.0, 3.5, 3.5SP1, and the next 4.5 are updates for existing versions 2.0 and 4.0. And use the same version of the CLR, about the version you are asking about. Updates add additional builds. Otherwise, you cannot use, say, both 2.0 and 3.0, update 3.0 replaces 2.0. The only way to get the update version is to read the registry, as shown in the question you linked.

+1
source

Source: https://habr.com/ru/post/1388341/


All Articles