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. Hadoop-2.4.1 ubuntu集群安装配置教程

    一.环境 系统: Ubuntu 14.04 32bit Hadoop版本: Hadoop 2.4.1 (stable) JDK版本: 1.7 集群数量:3台 注意事项:我们从Apache官方网站下载的 ...

  2. CF1005F Berland and the Shortest Paths (树上构造最短路树)

    题目大意:给你一个边权为$1$的无向图,构造出所有$1$为根的最短路树并输出 性质:单源最短路树上每个点到根的路径 ,一定是这个点到根的最短路之一 边权为$1$,$bfs$出单源最短路,然后构建最短路 ...

  3. java读取excel文件内容

    1.导入依赖JAR包 <!-- jxl 操作excel --> <dependency> <groupId>org.jxls</groupId> < ...

  4. CSS 子元素选择器

    所有选择器参考手册:http://www.w3school.com.cn/cssref/css_selectors.asp 1)子元素选择器 参考链接:http://www.w3school.com. ...

  5. Visual Studio 2013 无法创建MVC项目,系统找不到指定的文件.(Exception from HRESULT:08x0070002)

    在Visual Studio 2013中创建新MVC项目,(PS:现在创建个MVC项目,差点都找不到在哪,汗!-) 确定后提示,系统找不到指定的文件.(Exception from HRESULT:0 ...

  6. 疯狂软件对Oracle放弃Java EE的看法

    近日网络上出现了一些关于Oracle将要放弃Java EE的说法,在Java行业引起不小的关注,甚至有些人开始担心Java会不会就此消亡,但事实上这不过是杞人忧天,疯狂软件教学总监李刚根据多年来Jav ...

  7. VT-x is disabled in the BIOS. (VERR_VMX_MSR_VMXON_DISABLED)

    参考以下文章: http://94it.net/a/jingxuanboke/2014/0717/368367.html

  8. nginx和apache作为webserver的差别

    1.两者所用的驱动模式不同. nginx使用的是epoll的非堵塞模式事件驱动. apache使用的是select的堵塞模式事件驱动. 2.fastcgi和cgi的差别 当用户请求web服务的时候.w ...

  9. 走进Java(一)J2SE

    一.Java是什么 Java是Java语言和Java平台的总称.Java语言和C#一样.核心都是oo.并且比較而言,Java做的更好. Java由四方面组成:         • Java编程语言,即 ...

  10. HTML样式以及使用

    HTML的样式包含: 1,标签{style ,link} 2.属性{rel="styleSheet"外部样式表,type="text/css",margin-l ...