【问题标题】:Best .net framework version to work with Windows xp,7,8 without installing or updating it separately无需单独安装或更新即可与 Windows xp、7、8 一起使用的最佳 .net 框架版本
【发布时间】:2014-07-03 20:46:53
【问题描述】:

我将使用 Visual Studio 2012 部署一个用 C# 开发的 Windows 窗体应用程序。我不希望用户下载或更新 .net 框架版本。那么大多数 Windows 版本预安装和启用的最佳 .net 框架版本是什么? (最好是Windows xp,7,8)

【问题讨论】:

    标签: c# .net windows visual-studio-2012 windows-xp


    【解决方案1】:

    您不能假定安装了 任何 版本的 .NET Framework。 Windows is not a .NET Framework delivery channel.

    如果尚未安装框架版本,则绝对必须计划在计算机上安装框架版本。通常,这由安装程序处理,但如果您愿意,也可以使用 ClickOnce 部署。

    一般的策略是选择支持您需要支持的操作系统的框架的最高版本并使用该版本。在尚未安装时安装它。

    【讨论】:

    • 这在现代 Windows 中是非常不真实的——也就是说,鉴于您指向 2011 年初的一篇文章。Powershell - 需要在所有当前 Windows 上进行标准安装 - 需要安装 .NET 框架。
    • 为什么我不能假设任何版本的 .net 框架都是预安装的。 link
    • Server 2008 R2 在我的书中仍然是“现代的”,并且绝对不能保证安装了 .NET Framework。是的,如果你安装了 PowerShell,.NET 就在那里。但 PowerShell 不是“必需的”。它也是可选的。 @tom
    • @TomTom 谢谢你的信息
    • @CodyGray 2008 R2 不是最新的。它落后了2代。强制性的 powershell 正是在那之后的一代开始的。因此,当前和上一代 Windows 都强制安装了 .NET。
    【解决方案2】:

    最常安装的 .Net 版本是 .Net 2,但是 WinXP 没有安装默认的 .Net 框架

    来自维基百科:http://en.wikipedia.org/wiki/.NET_Framework

    .NET Framework 1.1: Windows Server 2003
    .NET Framework 2.0: Windows Server 2003 R2
    .NET Framework 3.0: Windows Vista, Windows Server 2008
    .NET Framework 3.5: Windows 7, Windows Server 2008 R2
    .NET Framework 4.0: n/a
    .NET Framework 4.5: Windows 8, Windows Server 2012
    

    【讨论】:

    • 谢谢。是否已在所有版本上预先安装并启用?
    • 根据this感觉3.5最支持
    • 这篇维基百科文章具有误导性。 .NET Framework 在许多这些版本的 Windows 中都是一个可选组件。是的,它在安装介质中提供,但不保证会安装。我有一个运行 Server 2008 R2 的机器,它肯定没有安装 .NET 3.5。
    猜你喜欢
    • 2011-01-27
    • 2013-01-30
    • 1970-01-01
    • 2020-05-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-05
    • 2020-02-29
    • 1970-01-01
    相关资源
    最近更新 更多