美文网首页
dotnet run on ubuntu

dotnet run on ubuntu

作者: wwmin_ | 来源:发表于2023-03-12 23:06 被阅读0次

dotnet run 官网
https://learn.microsoft.com/zh-cn/dotnet/core/tools/dotnet-run

基本操作

-- 运行发布后的dll文件
dotnet myapp.dll
-- 运行当前目录中的项目:
dotnet run
-- 运行指定的项目:
dotnet run --project ./projects/proj1/proj1.csproj
-- 运行当前目录中的项目,并指定 Release 配置:
dotnet run --property:Configuration=Release
-- 运行当前目录中的项目(在本例中,--help 参数被传递到应用程序,因为使用了空白的 -- 选项):
dotnet run --configuration Release -- --help
-- 在仅显示最小输出的当前目录中还原项目的依赖项和工具,然后运行项目:
dotnet run --verbosity m

命令摘要

dotnet run [-a|--arch <ARCHITECTURE>] [-c|--configuration <CONFIGURATION>]
    [-f|--framework <FRAMEWORK>] [--force] [--interactive]
    [--launch-profile <NAME>] [--no-build]
    [--no-dependencies] [--no-launch-profile] [--no-restore]
    [--os <OS>] [--project <PATH>] [-r|--runtime <RUNTIME_IDENTIFIER>]
    [-v|--verbosity <LEVEL>] [[--] [application arguments]]

dotnet run -h|--help

dotnet run 命令为从源代码使用一个命令运行应用程序提供了一个方便的选项。 这对从命令行中进行快速迭代开发很有帮助。 命令取决于生成代码的 dotnet build 命令。 对于此生成的任何要求,例如项目必须首先还原,同样适用于 dotnet run

  • 查看特定端口运行的进程
    ubuntu
-- 查找特定端口的进程
lsof -i :9006
-- 终止进程
kill -9  进程号
-- 使用nohup 和 dotnet 启动进程 
nohup dotnet ZYProject.ZYStore.HttpApi.Host.dll --urls http://172.17.91.86:9006

-- 查看ip地址
ifconfig

相关文章

网友评论

      本文标题:dotnet run on ubuntu

      本文链接:https://www.haomeiwen.com/subject/elwqrdtx.html