• Hi

    To get this script working in dotnet core when deploying the bot as a dll (normally running dotnet bot.dll), use the following amendment:

    $process = Start-Process -FilePath "C:\Program Files\dotnet\shared\Microsoft.NETCore.App\1.1.2\dotnet.exe" -ArgumentList "path to bot<bot>.dll" -PassThru -WorkingDirectory "path to bot" -Wait

    Notes:

    • the -NoNewWindow switch causes an error

    • you specify your bot dll in the ArgumentList

    • not sure if the -WorkingDirectory is necessary but it can't hurt

    • adding "$(Get-Date) Restarting..."; seemed helpful too.

    Hope this helps!

    Edited by Matthew Cole (-NEXUS-)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment