昨天在github上dnx的一个issue中看到这样一段话:

we're retiring dnx/dnu/dnvm toolchain and will move to dotnet CLI in RC2.

才知道dnx即将退役,取而代之的是donet cli,难怪最近github上dnx没有git commits呢。

立马直奔donet cli的github主页,在readme中看到了 http://dotnet.github.io/getting-started/ ,于是根据getting started在linux ubuntu上安装dotnet cli快速体验了一下。

安装命令如下:

sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get update
sudo apt-get install dotnet

没有了dnvm的身影,直接用apt-get安装,与linux有了更好的融合。

创建并运行一个hello world程序试试:

mkdir hello-world && cd $_
dotnet new
dotnet restore
dotnet run

运行结果:

Hello World!

之前运行程序用dnx,安装包包用dnu,现在统一用dotnet命令,这样的节奏更对头了。

接着在网上找了找资料,更多了解dotnet cli。

首先找到了 What is the difference between DNX and CLI?

To a large degree, we're just re-factoring DNX as opposed to 'replacing it' outright.

接着发现了 Intro to .NET Core CLI

.NET Core includes three new components: a set of standalone command-line (CLI) tools, a shared framework and a set of runtime services. These components will replace DNX and are essentially DNX split in three parts.

...

ASP.NET 5 will transition to the new tools for RC2. This is already in progress. There will be a smooth transition from DNX to these new .NET Core components.

再接着寻到了 Exploring the new .NET "dotnet" Command Line Interface (CLI)

My thinking has always been that when a new person sits down to learn node, python, ruby, golang, whatever, for the most part their experience is something like this. It should be just as easy - or easier - to use .NET.

感言

在RC阶段(目前.NET Core RC2)竟然发生如此大的变化,出乎人的意料,让人有种恨铁不成钢的感觉,也让人体会到了.NET在跨平台过程中的折腾、矛盾、徘徊。但是从结果来看,dotnet cli的确比dnx更对路,从中也可以看出.NET不仅仅是在为了跨平台而”跨“平台,而是在跨平台的过程中不断完善自己。

.NET跨平台:再见dnx,你好dotnet cli的更多相关文章

  1. 尝试在mac上用dotnet cli运行asp.net core示例程序

    自从知道微软用dotnet cli取代dnx之后,一直在等dotnet cli支持asp.net core... 昨天看到这篇新闻(ASP.NET Core 1.0 Hello World)后,才知道 ...

  2. dotnet CLI工具是如何运行你的代码的

    原文连接:https://mattwarren.org/2016/07/04/How-the-dotnet-CLI-tooling-runs-your-code/作者 Matt Warren.授权翻译 ...

  3. 在Linux上编译dotnet cli的源代码生成.NET Core SDK的安装包

    .NET 的开源,有了更多的DIY乐趣.这篇博文记录一下在新安装的 Linux Ubuntu 14.04 上通过自己动手编译 dotnet cli 的源代码生成 .net core sdk 的 deb ...

  4. 使用 dotnet cli 命令上传 nuget 程序包

    前言 前面写了一篇文章介绍了如何将自己的程序集打包成nuget package并上传到nuget.org,传送门.全部是通过网页端来进行操作的,现在介绍一种比较方便快捷的方法就是用dotnet cli ...

  5. 使用 DotNet CLI 创建自定义的 WPF 项目模板

    描述 当我们安装完 DotNetCore 3.0 版本的 SDK 后,我们就可以创建基于 DotNetCore 的 WPF 项目模板,通过如下 CLI 可以方便快捷的创建并运行我们的项目: dotne ...

  6. 使用 dotnet CLI 来打包和发布 .NET Core nuget package

    原文链接:使用 dotnet CLI 来打包和发布 .NET Core nuget package 如何使用 visual studio 2015/2017 打包和发布 Nuget package, ...

  7. efcore dotnet cli add-migrations update-database

    add-migrations update-database 如何通过dotnet cli调用 dotnet tool install --global dotnet-ef dotnet ef mig ...

  8. 使用dotnet Cli向nuget发布包

    长话短说, 今天分享如何在nuget.org创建并发布.NET Standard package. 前置 安装勾选.NET Core开发套件的Visual Studio; 安装dotnet Cli 从 ...

  9. dotnet cli

    前言 dotnet cli (Command-Line Interface) .net 源代码和二进制文件管理工具.需要安装 .NET Core SDK. 终端执行 dotnet --info 可以打 ...

随机推荐

  1. mysql的从头到脚优化之服务器参数的调优

    一. 说到mysql的调优,有许多的点可以让我们去做,因此梳理下,一些调优的策略,今天只是总结下服务器参数的调优  其实说到,参数的调优,我的理解就是无非两点: 如果是Innodb的数据库,innod ...

  2. JavaScript:JSON

      JSON是一种数据格式,它并不从属于JavaScript,很多语言都有JSON的解析器和序列化器. 语法 JSON可以表示三种类型: 简单值:使用与JavaScript相同的语法,可以在JSON中 ...

  3. javascript中document.appendChild和document.body.appendChild的问题

    在IE7中 var conentDiv = document.createElement("div"); document .body .appendChild(conentDiv ...

  4. asp.net mvc 模型验证-最舒服的验证方式

    在院子里发现 http://www.cnblogs.com/yangecnu/p/3759784.html 模型验证方法 1. 一般方法 繁琐, 无数的if else, 在炎炎夏天,我见过一个验证方法 ...

  5. 【MVC】 异常处理

    [MVC] 异常处理 一 . 自定义 HandleErrorAttribute public class ExceptionLogAttribute : HandleErrorAttribute { ...

  6. [2015hdu多校联赛补题]hdu5324 Boring Class

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5324 题意:给你一个二维的序列,让你找出最长的第一维升第二维降的子序列(如果多个答案,输出字典序最小) ...

  7. ng-bind,ng-cloak优化数据显示

    <div>{{text}}</div> 当我们使用angular在页面中有取值的时候,如果出现网络加载慢的问题,可能会在页面上出现{{text}}这种不好的体验,那么angul ...

  8. XE随想4:SuperObject增、删、改

    unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, For ...

  9. .net mvc 微信支付

    一.微信第三方登录 通过微信打开链接:http://www.hzm.com/Entry/Login 微信OAuth2.0授权登录目前支持authorization_code模式,适用于拥有server ...

  10. where子句的使用

    关系运算符: = > < <= >= != <> 略. 有一个<=> 有啥用? 其实也是判断等于. 不比较NULL值,效果就和= 一样,比较NULL值, ...