.NET Core dotnet 命令


dotnet new

dotnet restore

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