一、使用命令创建并运行.Net Core程序
1.dotnet new xxx:创建指定类型的项目console,mvc,webapi 等
2.dotnet restore :加载依赖项
dotnet restore 调用到 NuGet 以恢复依赖项树。 NuGet 分析 project.json 文件、下载文件中所述的依赖项(或从计算机缓存中获取)并编写 project.lock.json 文件。 需要 project.lock.json 文件才可进行编译和运行。
3.dotnet build:编译C#源代码
4.dotnet run:运行程序

dotnet run 调用 dotnet build 来确保已生成要生成的目标,然后调用 dotnet <assembly.dll> 运行目标应用程序。
参考地址:https://docs.microsoft.com/zh-cn/dotnet/articles/core/tutorials/using-with-xplat-cli
更多命令:https://docs.microsoft.com/zh-cn/dotnet/articles/core/tools/

关于VS Code 的整理:
https://code.visualstudio.com/docs/languages/csharp
1.安装C#语言等相关插件
2.调试应用


https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp
更多:
本文介绍了如何通过命令行工具创建、编译和运行 .Net Core 应用程序。包括使用 dotnet new 创建项目,使用 dotnet restore 加载依赖项,使用 dotnet build 编译代码,以及使用 dotnet run 运行程序。
961

被折叠的 条评论
为什么被折叠?



