.NET Core dotnet 命令

dotnet new

dotnet restore

dotnet watch run 开发阶段运行后,当代码发生变动的时候自动执行编译

dotnet run 执行程序

dotnet xxx.dll 也是执行程序

dotnet build 编译代码

dotnet test

dotnet pack

dotnet publish 默认发布,发布后定位到publish目录使用 dotnet xx.dll 执行应用。

可以在项目目录下新建publish.bat文件,写入下面命令,就可以双击直接执行来快速发布项目

dotnet publish --framework netcoreapp3.1 --output "D:\NET Core项目\项目xxx\publish" --configuration Release

 

posted @ 2022-04-08 15:01  以德为先  阅读(231)  评论(0编辑  收藏  举报