zoukankan      html  css  js  c++  java
  • .NET Core 和 .NET Framework 之间的关系

    引用一段描述:Understanding the relationship between .NET Core and the .NET Framework

    .NET Core and the .NET Framework have (for the most part) a subset-superset relationship. .NET Core is named "Core" since it contains the core features from the .NET Framework, for both the runtime and framework libraries. For example, .NET Core and the .NET Framework share the GC, the JIT and types such as String and List<T>. We'll continue improving these components for both .NET Core and .NET Framework.

    .NET Core was created so that .NET could be open source, cross platform and be used in more resource-constrained environments. We have also published a subset of the .NET Reference Source under the MIT license, so that you and the community can port additional .NET Framework features to .NET Core.


    上面这两段话,最重要的是前面两句,.NET Core 和 .NET Framework 之间的关系,就是“subset-superset”,可以理解为子集的关系,.NET Framework 是一个大的概念,.NET Core 是从它里面分离出来的 Core(核心)部分,dudu 之前有个比喻:.NET Framework 是 Unix,.NET Core 是 Linux,其实这个比喻总感觉不太恰当,这样比喻的观点是 .NET Core 是从 .NET Framework 演化而来,有点像父类-子类关系,而不是子集关系。

    回答园友的几个问题:

    1. .net framework 4.6 完全包括 .net core 5 吗?也就是说用 .net core 5 写的代码,能直接使用 .net framework 4.6 编译吗?

    --完全包括(4.6 是 .NET Framework 版本号,并不是 .NET Framework 基础类库版本号),.NET Framework 是大的概念,编译是编译器做的工作,当然概念中包含编译器,也可以说可以编译。

    2. 除了 aps.net 外,.net core 5 还包括了哪些 .net framework 4.6 中的特性?WF 包括吗?WCF 包括吗?windows form 和 wpf 应该不包括吧?

    --现在的 .NET Core 可以理解为在 GitHub 中的:corefx 和 coreclr,Web Forms 不包含,WCF 只包含客户端,windows form 暂没看到,wpf 不支持。

    3. 为什么 .net core 直接就到 5 了,而没有和 .net framework 用同样的版本号?

    --.NET Core 和 .NET Framework 是子集关系,所以版本号是独立的。

    参考:.NET Core与.NET Framework、Mono之间的关系

  • 相关阅读:
    基于索引的MySQL优化
    SQL优化:
    in的对象选择(子查询还是List集合),in 的优化,in与exists
    嵌套查询及其作用域:
    group by实现原理及其作用
    批量打回未报bug修复
    解析Job,bpmn文件的小项目总结
    用户短时间内多次提交与保存带来的问题
    嵌套连接
    多范围读取优化
  • 原文地址:https://www.cnblogs.com/xishuai/p/understanding-the-relationship-between-net-core-and-the-net-framework.html
Copyright © 2011-2022 走看看