.NET Standard vs .NET Core

问:


I have read about the difference between .NET Standard and .NET Core, but I really don't know what the difference is, or when to choose a .NET Standard library project and when to choose a .NET Core library project.
I have read that .NET Standard is to ensure that a set of APIs are always available, no matter the platform used (as long as that platform is compatible with the .NET Standard version that I have chosen). If I'm not mistaken, this means that I can create a class library of .NET Standard and then use it on any platform that is compatible with the .NET Standard version that I have chosen.
With .NET Core, I have read that it is intended for cross-platform use too, so if I choose a .NET Core library it seems that I can use it on many platforms too, just like .NET Standard.
So at the end, I don't see the difference. When should I use which? What is the difference between them?

答:


.NET Standard is a specification, so a library compiled for a specific .NET Standard version can be used in different .NET Standard implementations.
As said in my other comment, a good analogy for the relationship between .NET Standard and other .NET Standard Implementations (.NET Core, .NET Framework, etc): .NET Standard versions are Interfaces, while frameworks are implementations of those interfaces.

Note: in the original analogy used interfaces for both .NET Standard versions and frameworks implementations. I believe that using interfaces and classes is, instead, more intuitive and better represents the relationship between specifications and concrete implementations.

In code terms:
.NET Standard = interface
.NET Core, .NET Framework, etc = classes

原文链接

.NET Standard和.NET Core是什么关系(转载)的更多相关文章

  1. 错误处理:java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/rt/core/ForEachTag

    在使用JSP.Servlet进行开发时,遇到java.lang.NoClassDefFoundError: org/apache/taglibs/standard/tag/rt/core/ForEac ...

  2. .NET Standard vs. .NET Core

    What is the difference between .NET Core and .NET Standard Class Library project types? Answer1 When ...

  3. Spark中Task,Partition,RDD、节点数、Executor数、core数目的关系和Application,Driver,Job,Task,Stage理解

    梳理一下Spark中关于并发度涉及的几个概念File,Block,Split,Task,Partition,RDD以及节点数.Executor数.core数目的关系. 输入可能以多个文件的形式存储在H ...

  4. C# 数据操作系列 - 6 EF Core 配置映射关系

    0. 前言 在<C# 数据操作系列 - 5. EF Core 入门>篇中,我们简单的通过两个类演示了一下EF增删改查等功能.细心的小伙伴可能看了生成的DDL SQL 语句,在里面发现了些端 ...

  5. ASP.NET Core读取AppSettings (转载)

    今天在把之前一个ASP.NET MVC5的Demo项目重写成ASP.NET Core,发现原先我们一直用的ConfigurationManager.AppSettings[]读取Web.config中 ...

  6. (摘)使用 .NET Core 实现依赖关系注入

    为什么使用依赖关系注入? 使用 .NET,通过 new 运算符(即,new MyService 或任何想要实例化的对象类型)调用构造函数即可轻松实现对象实例化.遗憾的是,此类调用会强制实施客户端(或应 ...

  7. EF Core中外键关系的DeleteBehavior介绍(转自MSDN)

    Delete behaviors Delete behaviors are defined in the DeleteBehavior enumerator type and can be passe ...

  8. .NET Standard - 揭秘 .NET Core 和 .NET Standard[转自MSDN]

    作为 .NET 系列的最新成员,.NET Core 和 .NET Standard 的概念及其与 .NET Framework 的区别并不十分明确.在本文中,我将准确介绍每个产品及其适用场景. 在详细 ...

  9. .Net Standard(.Net Core)实现获取配置信息

    一.前言 在.Net Framework框架有专门获取webconfig配置的方法供我们使用,但是在.Net Core或者.Net Standard中没有可以直接使用的方法来获取配置文件信息,下面就来 ...

随机推荐

  1. ios 开发学习步骤

    https://developer.apple.com/library/prerelease/ios/referencelibrary/GettingStarted/RoadMapiOSCh/Wher ...

  2. Jmeter进阶技能-数据库信息,传递参数

    因为项目的原因,假设我们要实现如下要求:从数据库的用户表里获取用户信息,并作为参数全部传递给登录请求,分别完成登录操作. 01Jmeter连接数据库 1.添加JDBC Connection Confi ...

  3. Scrum 冲刺第二篇

    我们是这次稳了队,队员分别是温治乾.莫少政.黄思扬.余泽端.江海灵 一.会议 1.1  26号站立式会议照片: 1.2  昨天已完成的事情 团队成员 任务内容 黄思扬 Web 端首页.内容管理页开发. ...

  4. lua脚本之钉钉免密登录

    nginx.conf worker_processes ; error_log logs/error.log; events { worker_connections ; } http { resol ...

  5. eclipse springboot工程打war包方法及在Tomcat中运行的方法

    一, eclipse springboot打war包 1. 配置pom.xml文件 <packaging>war</packaging> <!-- 配置servlet,打 ...

  6. 简简单单,jquery中,使用checkbox控制div的显示与隐藏

    今天开发代码时,发现好久不用jquery就生疏了. 所以作这个记录, 使用checkbox控制div的显示与隐藏. 一,html代码处: <input type="checkbox&q ...

  7. XSS-DOM

    DOM型XSS是基于DOM文档对象模型的一种漏洞 通过 HTML DOM,树中的所有节点均可通过 JavaScript 进行访问.所有 HTML 元素(节点)均可被修改,也可以创建或删除节点.(引用W ...

  8. idea 配置 scala

    在setting 中,通过plugin 安装 Scala 然后重启idea 重启后,建一个scala文件,根据上面提示安装scala

  9. appium--解决每次安装appium setting和Unlock

    前戏 每次启动appium进行自动化的时候,都会提示我们需要安装appium setting和Unlock,而且还都要手动确认 那这两个文件是做什么的呢? Appium settings:用于设置网络 ...

  10. [NOI2019]回家路线(最短路,斜率优化)

    终于把这鬼玩意弄完了-- 为什么写的这么丑-- (顺便吐槽 routesea) 最短路的状态很显然:\(f[i]\) 表示从第 \(i\) 条线下来的最小代价. 首先明显要把那个式子拆开.直觉告诉我们 ...