zoukankan      html  css  js  c++  java
  • Windows 操作系统与 .NET Framework

    Windos 2000

    在单位的机房里好不easy才找到一台安装 Windows 2000 Server SP4 操作系统的server。这台硕果仅存的server到本月底也要退役了。

    Windows 2000

    Windows 2000

    Windows 2000 操作系统是没有预装不论什么版本号的 .NET Framework 的。下图中的 Microsoft .NET Framework 2.0 是我为了在该server上执行一些 C# 语言写的小程序而安装的。

    Windows 2000

    Windows XP

    下图中的 Windows XP Professional SP3 操作系统是我们单位办公用机专用的。装机量很的大。

    Windows XP

    Windows XP

    相同,Windows XP 操作系统也没有预装 .NET Framework。下图中的 Microsoft .NET Framework 全家福也是我自己安装的。

    WIndows XP

    Windows Server 2003

    Windows Server 2003 操作系统最初叫作“Windows .NET Server”。后改成“Windows .NET Server 2003”,终于被改成“Windows Server 2003”,于2003年3月28日公布。并在同年四月底上市。正如原来的名字中的 .NET 所暗示的。Microsoft .NET Framework 1.1 已经成为该操作系统的组件了。不须要另外安装。

    2005年发售的 Windows Server 2003 R2 中内置了 Microsoft .NET Framework 2.0。

    除了前面提到的一台以外,我们机房中的其它server所有都是安装这个版本号的操作系统。

    Windows Server 2003 R2 - 1

    Windows 2003

    下图的 Windows 组件向导中已经包含 Microsoft .NET Framework 2.0 了。

    Windows Server 2003 R2 - 2

    在加入或删除程序中能够看到其它版本号的 Microsoft .NET Framework:

    Windows Server 2003 R2 - 3

    Windows Vista

    下图中的 Windows Vista 是我购买的 Dell Inspiron 1520 本本预装的操作系统。

    Windows Vista - 1

    Windows Vista

    Windows Vista

    能够看出。Microsoft .NET Framework 3.0 (includes .NET 2.0) 已经成为 Vista 操作系统的组件了。

    Windows Vista

    更高版本号的 .NET Framework 就要自己安装了:

    Windows Vista

    Windows 7

    下图中的 Windows 7 专业版眼下仅用来測试兼容性:

    Windows 7 - 1

    Windows 7

    能够看出。Windows 7 操作系统已经内置了 .NET Framework 3.5 (includes .NET 2.0 and 3.0)。

    Windows 7 - 2 

    Microsoft .NET Framework 4 还须要自己安装:

    Windows 7 - 3

    Windows 8

    下图中的 Windows 8 Consumer Preview 是我到 Microsoft 站点下载后安装的。

    Windows 8 - 1

    Windows 8

    能够看出,Windows 8 操作系统默认安装了 .NET Framework 4.5,而且 .NET Framework 3.5 (includes .NET 2.0 and 3.0)也是该操作系统的组件,可是默认没有启用该组件。

    Windows 8 -2

    所下面图中就不包含不论什么版本号的 .NET Framework 了。

    Windows 8 - 3

    假设在 Windows 8 操作系统中执行 .NET 2.0 的程序,就会弹出下面对话框。

    Windows 8

    測试程序

    让我们写一个很easy的程序来測试一下吧:

    复制代码
     1 using System;
     2 using System.IO;
     3 
     4 static class Tester
     5 {
     6   static void Main()
     7   {
     8     Console.WriteLine("OS  Version: " + Environment.OSVersion);
     9     Console.WriteLine("CLR Version: " + Environment.Version);
    10   }
    11 }
    复制代码

    该程序在各种 Windows 操作系统中的执行结果例如以下所看到的:

    Windows 2000
    OS  Version: Microsoft Windows NT 5.0.2195 Service Pack 4
    CLR Version: 2.0.50727.832
    
    Windows XP
    OS  Version: Microsoft Windows NT 5.1.2600 Service Pack 3
    CLR Version: 2.0.50727.3625
    CLR Version: 4.0.30319.239
    
    Windows Server 2003
    OS  Version: Microsoft Windows NT 5.2.3790 Service Pack 2
    CLR Version: 2.0.50727.3625
    CLR Version: 4.0.30319.239
    
    Windows Vista
    OS  Version: Microsoft Windows NT 6.0.6002 Service Pack 2
    CLR Version: 2.0.50727.4216
    CLR Version: 4.0.30319.239
    
    Windows 7
    OS  Version: Microsoft Windows NT 6.1.7601 Service Pack 1
    CLR Version: 2.0.50727.5420
    CLR Version: 4.0.30319.239
    
    Windows 8 Consumer Preview
    OS  Version: Microsoft Windows NT 6.2.8250.0
    CLR Version: 2.0.50727.6111
    CLR Version: 4.0.30319.17379
    

    上述结果中的 CLR 2.0 和 CLR 4.0 是分别使用对应版本号的 C# 编译器编译后两次执行的结果。

    Windows 操作系统内核版本号

    各 Windows 操作系统的内核版本号例如以下所看到的:

    • Windows NT 5.0: Windows 2000
    • Windows NT 5.1: Windows XP
    • Windows NT 5.2: Windows Server 2003, Windows Server 2003 R2
    • Windows NT 6.0: Windows Vista, Windows Server 2008
    • Windows NT 6.1: Windows 7, Windows Server 2008 R2
    • Windows NT 6.2: Windows 8

    从上面能够看出。所谓的 Windows 7、Windows 8 只是是 Windows NT 6.1、6.2。而 Windows Server 2008 R2 相对于 Windows Server 2008 来说,进行了比較大的升级。

    Components and Layers .NET Framework versions

    .NET Framework

    上图来源于:MSDN: .NET Framework Versions and Dependencies

  • 相关阅读:
    C#值类型和引用类型的不同
    C# new用法总结-转
    C#中New关键词的几种用法
    命令行客户端MySQL的使用(1)——Python
    数据库的基本使用——MySQL
    生成器的创建方式——Python
    with与“上下文管理器”——Python
    魔法属性——Python
    property属性——Python
    正则匹配之贪婪和非贪婪——Python
  • 原文地址:https://www.cnblogs.com/mfmdaoyou/p/6935052.html
Copyright © 2011-2022 走看看