dotnet core cli 命令

1 dotnet new

 

 

 

 

2 创建code 程序

dotnet new console

 

 

 

 

 

using System;

 

namespace cli

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine("Hello World!");

}

}

}

 

3 还原 dotnet restore

 

 

 

 

4 编译 dotnet build

 

 

 

5 运行 donet run

 

 

 

 

 

dotnet core 2.0

添加 package

6 dotnet add package Microsoft.AspNetCore.Cors --version 2.0.1

 

 

 

删除package

7 dotnet remove package Microsoft.AspNet.WebApi.Cors

 

 

 

 

 

posted @ 2017-12-13 16:13  b0b0  阅读(2050)  评论(0编辑  收藏  举报