昨天在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. python学习笔记:文件操作和集合(转)

    转自:http://www.nnzhp.cn/article/16/ 这篇博客来说一下python对文件的操作. 对文件的操作分三步: 1.打开文件获取文件的句柄,句柄就理解为这个文件 2.通过文件句 ...

  2. 多台web如何共享session进行存储(转载)

    session的存储了解以前是怎么做的,搞清楚了来龙去脉,才会明白进行共享背后的思想和出发点.我喜欢按照这样的方式来问(或者去搞清楚):为什么要session要进行共享,不共享会什么问题呢? php中 ...

  3. AngularJS 中设置 AJAX get 请求不缓存的方法

    var app = angular.module('manager', ['ngRoute']); app.config(['$routeProvider', function($routeProvi ...

  4. shellcode流程

    shellcode就是汇编的opcode,一般以子函数形式出现: 取得shellcode的方便方式是: 1.写一个函数如: void __stdcall code(LONG &a, LONG ...

  5. js根据生日计算出年龄

    /*根据出生日期算出年龄*/ function jsGetAge(strBirthday){ var returnAge; var strBirthdayArr=strBirthday.split(& ...

  6. DUILIB 背景贴图

    贴图的描述 方式有两种    // 1.aaa.jpg    // 2.file='aaa.jpg' res='' restype='0' dest='0,0,0,0' source='0,0,0,0 ...

  7. linux运维笔记——常用命令详解diff

    1.diff 你可以把diff看成是linux上的文件比对工具 例子文件内容: [root@localhost disks]# cat test1.txt a b c d [root@localhos ...

  8. Sql Server 简单查询 异步服务器更新语句

    //结构:select 子句 [into 子句] from 子句  [where 子句] [group by 子句]  [having 子句] [order by 子句] select  dept_c ...

  9. Python学习第四天集合

    集合定义: 无序排列,可哈希 支持集合关系测试 成员关系测试 in not in 迭代 不支持:索引.元素获取.切片 集合的类型:set(),frozenset() 集合没有特定语法格式,只能通过工厂 ...

  10. JSON代码小计

    //strut json配置 <package name="mall_theme_ajax" extends="json-default" namespa ...