如果安装在安装了 .Net 4.6.2 的机器上,.Net 4.6.1 运行 的 .Net 版本是什么?

What version of .Net will a .Net 4.6.1 run under if installed on a machine that has .Net 4.6.2 installed?

我们中的一些人正在讨论,特别是关于 .Net 4.6.2 中发布的此修复程序:

We fixed the 260 character (MAXPATH) file name length limitation in the System.IO APIs. Over 4500 of you voted for this issue on UserVoice!

source

我们在安装在客户端上的应用程序中遇到了这个异常,解决了这个问题。我们不控制安装在这些客户端上的 .Net 版本,尽管我们的安装程序指定了最低版本,至少是 .Net 4.6.1(即将升级)。

因此,如果我们的应用程序 运行ning 为 4.6.1,我们会遇到此问题,如果它 运行ning 为 >4.6.2,则不会。

我们的应用程序针对.Net 4.6.1,所以我说我们需要升级,因为我们遇到了这个问题,一位同事说:

anyone with a newer version of .Net wouldn't hit this problem

我说这是错误的,程序集仍会 运行 为 4.6.1 而不是 4.6.2。我想我是基于 article I read some time ago by Scott Hansellman 但这是专门针对旧版本(.Net 的 4.5 之前版本)的。所以现在我不确定我是否正确:

In-place upgrade means that the CLR is the same but new libraries are added as well as bug fixes and performance improvements

那么给定一个针对 4.6.1 编译的应用程序访问安装了 .Net 4.6.2 的机器上的长文件路径,我们是否会得到异常?

来自 the offline installer download for .NET 4.6.2(强调我的):

The Microsoft .NET Framework 4.6.2 is a highly compatible in-place update to the Microsoft .NET Framework 4, 4.5, 4.5.1, 4.5.2, 4.6, and 4.6.1.

"in-place"部分意味着它有效地替代了以前的版本。至少,这是我对它的理解。因此,当您 运行 一个 .NET 4.x 应用程序在一台安装了 4.6.2(之后没有更新)的机器上时,它将 运行 在 4.6.2 下。