https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
Win7预装.NET 3.5,所以目标运行在Win7的电脑,设置目标为3.5即可, Win10上预装4.6。可以设置目标为4
3.5和 4.X是两个系列。3.5包含之前的版本。4.X各个版本向前兼容,但是不兼容3.5
Targeting and running apps for older versions
.NET Framework versions 2.0, 3.0, and 3.5 are built with the same version of the CLR (CLR 2.0). These versions represent successive layers of a single installation. Each version is built incrementally on top of the earlier versions. It is not possible to run versions 2.0, 3.0, and 3.5 side by side on a computer. When you install version 3.5, you get the 2.0 and 3.0 layers automatically, and apps that were built for versions 2.0, 3.0, and 3.5 can all run on version 3.5. However, .NET Framework 4 ends this layering approach, and it and later releases (.NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, and 4.8) also represent successive layers of a single installation. Starting with .NET Framework 4, you can use in-process side-by-side hosting to run multiple versions of the CLR in a single process. For more information, see Assemblies and Side-by-Side Execution.
In addition, if your app targets version 2.0, 3.0, or 3.5, your users may be required to enable the .NET Framework 3.5 on a Windows 8, Windows 8.1, or Windows 10 computer before they can run your app. For more information, see Install the .NET Framework 3.5 on Windows 10, Windows 8.1, and Windows 8.
网友评论