【问题标题】:Killing a previous deploy's process for .NET Core终止 .NET Core 的先前部署过程
【发布时间】:2018-04-24 19:00:52
【问题描述】:

我正在尝试使用 Octopus Deploy 为我的 .Net Core 控制台应用程序设置部署。我最初的想法是在启动新版本之前按名称杀死旧版本的进程,但问题是所有 .Net Core 进程都称为“dotnet”......有没有办法通过名称杀死 .Net Core 进程dll?

【问题讨论】:

    标签: .net-core octopus-deploy


    【解决方案1】:

    使用PowerShell:

    $process = Get-Process | where {$_.Name -eq 'dotnet' -and $_.modules.ModuleName -eq 'test.dll'}
    if ($process) {
        $process | Stop-Process -Force
    }
    

    【讨论】:

      猜你喜欢
      • 2016-10-15
      • 1970-01-01
      • 2018-07-08
      • 2016-01-26
      • 1970-01-01
      • 2018-02-10
      • 1970-01-01
      • 2017-08-15
      相关资源
      最近更新 更多