dotnet --info

PS E:\GitHub\KerryJiang\SuperSocket> dotnet --info
.NET Command Line Tools (2.1.4)

Product Information:
Version: 2.1.4
Commit SHA-1 hash: 5e8add2190

Runtime Environment:
OS Name: Windows
OS Version: 10.0.10586
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

Version : 2.0.5
Build : 17373eb129b3b05aa18ece963f8795d65ef8ea54

dotnet new console -o hwapp

dotnet restore

dotnet run

dotnet new

Creates a new project, configuration file, or solution based on the specified template.

Description

The dotnet new command provides a convenient way to initialize a valid .NET Core project.

The command calls the template engine to create the artifacts on disk based on the specified template and options.

dotnet restore

Restores the dependencies and tools of a project.

Description

The dotnet restore command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file. By default, the restoration of dependencies and tools are performed in parallel.

In order to restore the dependencies, NuGet needs the feeds where the packages are located.

Feeds are usually provided via the NuGet.config configuration file.

A default configuration file is provided when the CLI tools are installed.

You specify additional feeds by creating your own NuGet.config file in the project directory.

You also specify additional feeds per invocation at a command prompt.

For dependencies, you specify where the restored packages are placed during the restore operation using the --packages argument.

If not specified, the default NuGet package cache is used, which is found in the .nuget/packages directory in the user's home directory on all operating systems (for example, /home/user1 on Linux or C:\Users\user1 on Windows).

For project-specific tooling, dotnet restore first restores the package in which the tool is packed, and then proceeds to restore the tool's dependencies as specified in its project file.

The behavior of the dotnet restore command is affected by some of the settings in the Nuget.Config file, if present.

For example, setting the globalPackagesFolder in NuGet.Config places the restored NuGet packages in the specified folder.

This is an alternative to specifying the --packages option on the dotnet restore command.

For more information, see the NuGet.Config reference.

异常处理

PS D:\ChuckLu\Git\GitHub\KerryJiang\IrvineCSharpCourses> dotnet restore
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

这个命令需要在项目或者解决方案下运行才有效

dotnet run

Runs source code without any explicit compile or launch commands.

Description

The dotnet run command provides a convenient option to run your application from the source code with one command.

It's useful for fast iterative development from the command line.

The command depends on the dotnet build command to build the code.

Any requirements for the build, such as that the project must be restored first, apply to dotnet run as well.

Output files are written into the default location, which is bin/<configuration>/<target>.

For example if you have a netcoreapp1.0 application and you run dotnet run, the output is placed in bin/Debug/netcoreapp1.0.

Files are overwritten as needed.

Temporary files are placed in the obj directory.

If the project specifies multiple frameworks, executing dotnet run results in an error unless the -f|--framework <FRAMEWORK> option is used to specify the framework.

The dotnet run command is used in the context of projects, not built assemblies. If you're trying to run a framework-dependent application DLL instead, you must use dotnet without a command. For example, to run myapp.dll, use:

 
dotnet myapp.dll

For more information on the dotnet driver, see the .NET Core Command Line Tools (CLI) topic.

In order to run the application, the dotnet run command resolves the dependencies of the application that are outside of the shared runtime from the NuGet cache. Because it uses cached dependencies, it's not recommended to use dotnet run to run applications in production. Instead, create a deployment using the dotnet publish command and deploy the published output.

dotnet --version

PS E:\GitHub\KerryJiang\SuperSocket> dotnet sln .\SuperSocket.sln list
Project reference(s)
--------------------
src\SuperSocket.Primitives\SuperSocket.Primitives.csproj
src\SuperSocket.ProtoBase\SuperSocket.ProtoBase.csproj
src\SuperSocket.NetSocket\SuperSocket.NetSocket.csproj
src\SuperSocket.Libuv\SuperSocket.Libuv.csproj
test
test\Test\Test.csproj
src\SuperSocket.Server\SuperSocket.Server.csproj
src\SuperSocket.Channel\SuperSocket.Channel.csproj

-v|--verbosity <LEVEL>

Sets the verbosity level of the command. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].

dotnet 命令的使用的更多相关文章

  1. .NET Core dotnet 命令大全

    dotnet 命令大全,让你理解dotnet 命令. 本文将以一个实例串起 dotnet 所有命令,让你玩转dotnet 命令. 本篇文章编写环境为windows 10 ,dotnet 命令同样适用于 ...

  2. 『.NET Core CLI工具文档』(六)dotnet 命令

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet command 翻译:dotnet 命令 名称 dotnet -- 运行命令行命令的一般驱动程序 概要 d ...

  3. ASP.NET Core开发-MVC 使用dotnet 命令创建Controller和View

    使用dotnet 命令在ASP.NET Core MVC 中创建Controller和View,之前讲解过使用yo 来创建Controller和View. 下面来了解dotnet 命令来创建Contr ...

  4. Core开发-MVC 使用dotnet 命令创建Controller和View

    NET Core开发-MVC 使用dotnet 命令创建Controller和View   使用dotnet 命令在ASP.NET Core MVC 中创建Controller和View,之前讲解过使 ...

  5. Core dotnet 命令大全

    Core dotnet 命令大全 dotnet 命令大全,让你理解dotnet 命令. 本文将以一个实例串起 dotnet 所有命令,让你玩转dotnet 命令. 本篇文章编写环境为windows 1 ...

  6. dotnet 命令实战

    以下用实例串起dotnet所有命令,带你玩转dotnet命令. 1.创建(dotnet new) 首先我们创建一个项目,这里我们创建控制台程序,命令如下图所示. dotnet new dotnet n ...

  7. VisualStudioCode中用dotnet命令创建多个ASP.NET Core 项目、类库、控制台程序,并添加应用间的引用

    一.准备工作 首先安装VisualStudioCode并且可以使用. 1.首先新创建空的MyApps文件夹,作为项目主目录,下面将在这个文件夹中创建多个web应用程序.类型.控制台程序等. 2.打开V ...

  8. dotnet 命令

    以下用实例串起dotnet常用命令,带你玩转dotnet命令. 1.创建(dotnet new) 首先我们创建一个项目,这里我们创建控制台程序,命令如下图所示. dotnet new dotnet n ...

  9. 通过dotnet命令行设置asp.net core服务的启动地址

    需求: 通过dotnet命令行启动asp.net core 服务时,自定义监听端口. 方法: 在program.cs中增加命令行参数配置: WebHost.CreateDefaultBuilder(a ...

  10. [转].NET Core dotnet 命令大全

    本文转自:http://www.cnblogs.com/linezero/p/dotnet.html https://docs.microsoft.com/en-us/dotnet/articles/ ...

随机推荐

  1. go语言简单的执行shell命令

    package main import(     "fmt"     "os/exec"     "os"     "string ...

  2. SpaceVim配置中遇到的问题

    这是一个不断更新的随笔,若遇到SpaceVim配置问题时,会添加项 字体乱码(linux企鹅乱码,tabline图标乱码等) git clone https://github.com/powerlin ...

  3. [CTSC2007][APIO2007]数据备份Backup

    题目:BZOJ1150.codevs1615.洛谷P3620 题目大意:有n个点,k条链,每个点离原点有一定的距离.要你用k条链连接2k个点,使得k条链的长度最短. 解题思路:毕竟是CTSC级别的题目 ...

  4. [NOIP2003提高组]侦探推理

    题目:洛谷P1039.Vijos P1106.codevs1089. 题目大意:给你一系列证词,要你求出谁是凶手.具体题目见原题. 解题思路:我们枚举犯人和星期,一个一个进行判断.如果成功则记录答案, ...

  5. Java XSSF 导出excel 工具类

    参数解释: title:导出excel标题.headers 导出到excel显示的列头. columns 对应数据库字段 .list 导出数据1.pox中添加依赖 <dependency> ...

  6. 题解 洛谷 P3381 【【模板】最小费用最大流】

    发了网络流,再来一发费用流 能做费用流的,网络流自然做得来,但在这还是不要脸的安利一下自己的博客(里面也有网络流的题解): 点我 扯远了... 费用流,就是在不炸水管的情况下求源点到汇点的最小费用. ...

  7. [terry笔记]data guard基础知识

    如下介绍了data guard的基础知识,整理自网络: Data Gurad 通过冗余数据来提供数据保护,Data Gurad 通过日志同步机制保证冗余数据和主数据之前的同步,这种同步可以是实时,延时 ...

  8. 洛谷——P1428 小鱼比可爱

    https://www.luogu.org/problem/show?pid=1428 题目描述 人比人,气死人:鱼比鱼,难死鱼.小鱼最近参加了一个“比可爱”比赛,比的是每只鱼的可爱程度.参赛的鱼被从 ...

  9. Android 获取麦克风的音量(分贝)

    基础知识 度量声音强度.大家最熟悉的单位就是分贝(decibel,缩写为dB).这是一个无纲量的相对单位.计算公式例如以下: 分子是測量值的声压,分母是參考值的声压(20微帕.人类所能听到的最小声压) ...

  10. ShopEx文章页添加上一篇下一篇功能

    在全部的文章页中,会常常发现都会有这么一个功能.能引导用户去查看上一篇文章或下一篇文章,而在ShopEx中,我DEZEND了一下文章模型.并没有找到上一篇这种函数功能,因此,这就须要我们手动在相应的文 ...