札记

  博客园  :: 首页  :: 新随笔  ::  :: 订阅 订阅  :: 管理

title: "netcore命令行汇总"
layout: post
date: 2017-09-18 13:22:00"
categories: netcore

使用命令行进行新建项目,编译,newget包的还原等

vscode 命令:

显示所有命令 ctrl+shift+p
转到文件 ctrl+p
在文件中查找 ctrl+shift+f
开始调试 f5
切换终端 ctrl+`

第三方新建工具(.net core 1.0阶段):

dotnet aspnet-codegenerator 
npm install -g yo
npm install -g generator-aspnet

查看netcore 是否安装成功

dotnet --version

会列出已经存在的项目列表

dotnet new 

新建一个web应用程序

dotnet new -t web

还原应用程序,重新加载类库

dotnet restore  
dotnet restore -f E:\dotnet\applib\bin\Debug\

编辑应用程序

dotnet build

运行应用程序

dotnet run 
dotnet xxx.dll

发布应用程序

dotnet publish
eg: dotnet publish -r win10-x64
eg: dotnet publish -r ubuntu.14.04-x64

打包应用程序包

dotnet pack

运行一个测试

dotnet  test
posted on 2017-10-27 14:48  小泥巴2008  阅读(2884)  评论(0编辑  收藏  举报