Only disable service mode on Windows Server 2019
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Reflection;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using Microsoft.VisualBasic.Devices;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
using NLog.Targets;
|
||||
@@ -59,13 +60,13 @@ namespace Torch.Server
|
||||
return;
|
||||
}
|
||||
|
||||
/* Breaks on Windows Server 2019 and we don't fully support services anyway
|
||||
if (!Environment.UserInteractive)
|
||||
// Breaks on Windows Server 2019
|
||||
if (!new ComputerInfo().OSFullName.Contains("Server 2019") && !Environment.UserInteractive)
|
||||
{
|
||||
using (var service = new TorchService())
|
||||
ServiceBase.Run(service);
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
var initializer = new Initializer(workingDir);
|
||||
if (!initializer.Initialize(args))
|
||||
|
@@ -83,6 +83,7 @@
|
||||
<HintPath>..\GameBinaries\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Microsoft.Win32.Registry, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||
</Reference>
|
||||
|
Reference in New Issue
Block a user