您的位置:首页 > 产品设计 > UI/UE

.NET Core的“dotnet restore”、“dotnet build”和“dotnet run”命令都是用来干什么的?

2016-05-19 11:45 609 查看
dotnet restore

源代码:https://github.com/dotnet/cli/tree/rel/1.0.0/src/dotnet/commands/dotnet-restore

入口:https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-restore/Program.cs

作用:主要是寻找当前目录下的项目文件(project.json),然后利用NuGet库还原整个项目的依赖库,然后遍历每个目录,生成项目文件,继续还原该项目文件中的依赖项。

dotnet build

源代码:https://github.com/dotnet/cli/tree/rel/1.0.0/src/dotnet/commands/dotnet-build

入口:https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-build/Program.cs

作用:编译应用程序

dotnet run

源代码:https://github.com/dotnet/cli/tree/rel/1.0.0/src/dotnet/commands/dotnet-run

入口:https://github.com/dotnet/cli/blob/rel/1.0.0/src/dotnet/commands/dotnet-run/Program.cs

作用:运行应用程序

.NET CLI(.NET Core Command-Line) GitHub:https://github.com/dotnet/cli
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: