O .NET 4.6.1 torna o .NET 4.0 redundante?

5

Eu tenho um aplicativo direcionado ao .NET 4.0.30319. No entanto, o Windows Update apenas me fornece as opções para instalar o 4.5.2 ou 4.6.1 nos meus clientes. O aplicativo será executado com o .NET 4.6.1 ou 4.5.2 instalado? Ou eu preciso instalar o .NET 4.0.30319 manualmente?

    
por Urangurban 15.07.2016 / 20:31

1 resposta

8

4.5.x é uma "atualização in-loco" para .Net 4.0, e 4.6.x é uma atualização "in-loco" para 4.5.x, então sim, 4.6.x deve cobrir tudo que você precisa.

Veja detalhes aqui: link

Targeting and Running .NET Framework apps for version 4.5 and later

The .NET Framework 4.5 is an in-place update that replaces the .NET Framework 4 on your computer, and similarly, the .NET Framework 4.5.1 4.5.2, 4.6, 4.6.1, and 4.6.2 are in-place updates to the .NET Framework 4.5, which means that they use the same runtime version, but the assembly versions are updated and include new types and members. After you install one of these updates, your .NET Framework 4, .NET Framework 4.5, or .NET Framework 4.6 apps should continue to run without requiring recompilation. However, the reverse is not true. We do not recommend running apps that target a later version of the .NET Framework on the an earlier version of the .NET Framework. For example, we do not recommend that you run an app the targets the .NET Framework 4.6 on the .NET Framework 4.5. The following guidelines apply:

In Visual Studio 2013, you can choose the .NET Framework 4.5 as the target framework for a project (this sets the GetReferenceAssemblyPaths.TargetFrameworkMoniker property) to compile the project as a .NET Framework 4.5 assembly or executable. This assembly or executable can then be used on any computer that has the .NET Framework 4.5, 4.5.1, 4.5.2, 4.6, or 4.6.1 installed.

In Visual Studio, you can choose the .NET Framework 4.5.1 as the target framework for a project (this sets the GetReferenceAssemblyPaths.TargetFrameworkMoniker property) to compile the project as a .NET Framework 4.5.1 assembly or executable. This assembly or executable should be run only on computers that have the .NET Framework 4.5.1 or a later version of the .NET Framework installed. An executable that targets the .NET Framework 4.5.1 will be blocked from running on a computer that only has an earlier version of the .NET Framework, such as the .NET Framework 4.5, installed, and the user will be prompted to install the .NET Framework 4.5.1. In addition, the .NET Framework 4.5.1 assemblies should not be called from an app that targets an earlier version of the .NET Framework, such as the .NET Framework 4.5 .

The.NET Framework 4.5.1 and .NET Framework 4.5 are used here only as examples. This principle applies to any app that targets an a later version of the .NET Framework than the one installed on the system on which it is running.

Some changes in the .NET Framework may require changes to your app code; see Application Compatibility in the .NET Framework before you run your existing apps with the .NET Framework 4.5 or later versions. For more information about installing the current version, see Installing the .NET Framework. For information about support for the .NET Framework, see Microsoft .NET Framework Support Lifecycle Policy on the Microsoft Support website.

    
por 15.07.2016 / 21:35