本篇博客来了解一下dotnet这个神奇的命令。我会依次对dotnet,dotnet new,dotnet restore,dotnet build,dotnet test,dotnet run,dotnet pack,dotnet publish这些个命令的用法做个简单的介绍以及演示。
#dotnet new
dotnet new命令用来创建一个.net core项目,该命令包含两个选项,分别是-t(或–type)和-l(或-lang),用来指定项目类型和编程语言。
#dotnet restore
#dotnet test
{ "version": "1.0.0-*", "buildOptions": { "debugType": "portable" }, "dependencies": { "System.Runtime.Serialization.Primitives": "4.1.1", "xunit": "2.1.0", "dotnet-test-xunit": "1.0.0-rc2--24" }, "testRunner": "xunit", "frameworks": { "netcoreapp1.0": { "dependencies": { "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0" } }, "imports": [ "dotnet5.4", "portable-net451+win8" ] } } }
其中,“testRunner”: “xunit”指明了需要的单元测试运行器。
#dotnet run
#dotnet pack
#dotnet publish
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/208498.html原文链接:https://javaforall.net
