diff --git a/src/Tgstation.Server.Api/ApiHeaders.cs b/src/Tgstation.Server.Api/ApiHeaders.cs
index 062e521288..c8a3093c78 100644
--- a/src/Tgstation.Server.Api/ApiHeaders.cs
+++ b/src/Tgstation.Server.Api/ApiHeaders.cs
@@ -12,6 +12,7 @@ using Microsoft.Net.Http.Headers;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Properties;
+using Tgstation.Server.Common.Extensions;
namespace Tgstation.Server.Api
{
diff --git a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
index cb44534a9c..09a0d1bac7 100644
--- a/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
+++ b/src/Tgstation.Server.Api/Tgstation.Server.Api.csproj
@@ -48,4 +48,8 @@
+
+
+
+
diff --git a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj
index 07e99c9dd4..490a1c51dc 100644
--- a/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj
+++ b/src/Tgstation.Server.Client/Tgstation.Server.Client.csproj
@@ -27,7 +27,6 @@
-
diff --git a/src/Tgstation.Server.Api/VersionExtensions.cs b/src/Tgstation.Server.Common/Extensions/VersionExtensions.cs
similarity index 94%
rename from src/Tgstation.Server.Api/VersionExtensions.cs
rename to src/Tgstation.Server.Common/Extensions/VersionExtensions.cs
index 9a194f0abb..3e6b3102bd 100644
--- a/src/Tgstation.Server.Api/VersionExtensions.cs
+++ b/src/Tgstation.Server.Common/Extensions/VersionExtensions.cs
@@ -1,6 +1,6 @@
using System;
-namespace Tgstation.Server.Api
+namespace Tgstation.Server.Common.Extensions
{
///
/// Extensions for the class.
diff --git a/src/Tgstation.Server.Host.Console/Program.cs b/src/Tgstation.Server.Host.Console/Program.cs
index 1a3c02cd72..6ba3a851e9 100644
--- a/src/Tgstation.Server.Host.Console/Program.cs
+++ b/src/Tgstation.Server.Host.Console/Program.cs
@@ -1,10 +1,11 @@
using System;
using System.Collections.Generic;
+using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
-
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Watchdog;
namespace Tgstation.Server.Host.Console
@@ -34,6 +35,8 @@ namespace Tgstation.Server.Host.Console
/// A representing the running operation.
internal static async Task Main(string[] args)
{
+ System.Console.Title = $"tgstation-server Host Watchdog v{Assembly.GetExecutingAssembly().GetName().Version.Semver()}";
+
var arguments = new List(args);
var trace = arguments.Remove("--trace-host-watchdog");
var debug = arguments.Remove("--debug-host-watchdog");
diff --git a/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj b/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj
index 9a8d30a658..2ee844505b 100644
--- a/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj
+++ b/src/Tgstation.Server.Host.Watchdog/Tgstation.Server.Host.Watchdog.csproj
@@ -44,6 +44,7 @@
+
diff --git a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs
index 5cc8fb12cb..a2bd4e7420 100644
--- a/src/Tgstation.Server.Host.Watchdog/Watchdog.cs
+++ b/src/Tgstation.Server.Host.Watchdog/Watchdog.cs
@@ -10,7 +10,7 @@ using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
-
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Common;
namespace Tgstation.Server.Host.Watchdog
@@ -109,7 +109,7 @@ namespace Tgstation.Server.Host.Watchdog
return false;
}
- var watchdogVersion = executingAssembly.GetName().Version.ToString();
+ var watchdogVersion = executingAssembly.GetName().Version.Semver().ToString();
while (!cancellationToken.IsCancellationRequested)
using (logger.BeginScope("Host invocation"))
diff --git a/src/Tgstation.Server.Host/Components/InstanceManager.cs b/src/Tgstation.Server.Host/Components/InstanceManager.cs
index 23172671dc..bd0c687e20 100644
--- a/src/Tgstation.Server.Host/Components/InstanceManager.cs
+++ b/src/Tgstation.Server.Host/Components/InstanceManager.cs
@@ -87,6 +87,11 @@ namespace Tgstation.Server.Host.Components
///
readonly ISwarmServiceController swarmServiceController;
+ ///
+ /// The for the .
+ ///
+ readonly IConsole console;
+
///
/// The for the .
///
@@ -132,6 +137,11 @@ namespace Tgstation.Server.Host.Components
///
readonly CancellationTokenSource shutdownCancellationTokenSource;
+ ///
+ /// The original of .
+ ///
+ readonly string originalConsoleTitle;
+
///
/// The returned by .
///
@@ -155,6 +165,7 @@ namespace Tgstation.Server.Host.Components
/// The value of .
/// The value of .
/// The value of .
+ /// The value of .
/// The containing the value of .
/// The containing the value of .
/// The value of .
@@ -169,6 +180,7 @@ namespace Tgstation.Server.Host.Components
IAsyncDelayer asyncDelayer,
IServerPortProvider serverPortProvider,
ISwarmServiceController swarmServiceController,
+ IConsole console,
IOptions generalConfigurationOptions,
IOptions swarmConfigurationOptions,
ILogger logger)
@@ -183,10 +195,13 @@ namespace Tgstation.Server.Host.Components
this.asyncDelayer = asyncDelayer ?? throw new ArgumentNullException(nameof(asyncDelayer));
this.serverPortProvider = serverPortProvider ?? throw new ArgumentNullException(nameof(serverPortProvider));
this.swarmServiceController = swarmServiceController ?? throw new ArgumentNullException(nameof(swarmServiceController));
+ this.console = console ?? throw new ArgumentNullException(nameof(console));
generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
swarmConfiguration = swarmConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(swarmConfigurationOptions));
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
+ originalConsoleTitle = console.Title;
+
instances = new Dictionary>();
bridgeHandlers = new Dictionary();
readyTcs = new TaskCompletionSource();
@@ -426,42 +441,49 @@ namespace Tgstation.Server.Host.Components
///
public async Task StopAsync(CancellationToken cancellationToken)
{
- using (cancellationToken.Register(shutdownCancellationTokenSource.Cancel))
- try
- {
- logger.LogDebug("Stopping instance manager...");
-
- if (!startupTask.IsCompleted)
+ try
+ {
+ using (cancellationToken.Register(shutdownCancellationTokenSource.Cancel))
+ try
{
- logger.LogTrace("Interrupting startup task...");
- startupCancellationTokenSource.Cancel();
- await startupTask;
+ logger.LogDebug("Stopping instance manager...");
+
+ if (!startupTask.IsCompleted)
+ {
+ logger.LogTrace("Interrupting startup task...");
+ startupCancellationTokenSource.Cancel();
+ await startupTask;
+ }
+
+ var instanceFactoryStopTask = instanceFactory.StopAsync(cancellationToken);
+ await jobService.StopAsync(cancellationToken);
+
+ async Task OfflineInstanceImmediate(IInstance instance, CancellationToken cancellationToken)
+ {
+ try
+ {
+ await instance.StopAsync(cancellationToken);
+ }
+ catch (Exception ex)
+ {
+ logger.LogError(ex, "Instance shutdown exception!");
+ }
+ }
+
+ await Task.WhenAll(instances.Select(x => OfflineInstanceImmediate(x.Value.Instance, cancellationToken)));
+ await instanceFactoryStopTask;
+
+ await swarmServiceController.Shutdown(cancellationToken);
}
-
- var instanceFactoryStopTask = instanceFactory.StopAsync(cancellationToken);
- await jobService.StopAsync(cancellationToken);
-
- async Task OfflineInstanceImmediate(IInstance instance, CancellationToken cancellationToken)
+ finally
{
- try
- {
- await instance.StopAsync(cancellationToken);
- }
- catch (Exception ex)
- {
- logger.LogError(ex, "Instance shutdown exception!");
- }
+ console.Title = originalConsoleTitle;
}
-
- await Task.WhenAll(instances.Select(x => OfflineInstanceImmediate(x.Value.Instance, cancellationToken)));
- await instanceFactoryStopTask;
-
- await swarmServiceController.Shutdown(cancellationToken);
- }
- catch (Exception ex)
- {
- logger.LogCritical(ex, "Instance manager stop exception!");
- }
+ }
+ catch (Exception ex)
+ {
+ logger.LogCritical(ex, "Instance manager stop exception!");
+ }
}
///
@@ -535,6 +557,7 @@ namespace Tgstation.Server.Host.Components
try
{
logger.LogInformation("{versionString}", assemblyInformationProvider.VersionString);
+ console.Title = assemblyInformationProvider.VersionString;
CheckSystemCompatibility();
diff --git a/src/Tgstation.Server.Host/Components/Session/SessionController.cs b/src/Tgstation.Server.Host/Components/Session/SessionController.cs
index a5793e38a1..70a76e6760 100644
--- a/src/Tgstation.Server.Host/Components/Session/SessionController.cs
+++ b/src/Tgstation.Server.Host/Components/Session/SessionController.cs
@@ -13,8 +13,8 @@ using Newtonsoft.Json;
using Serilog.Context;
-using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Components.Byond;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Deployment;
diff --git a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
index 71756c841f..55439579db 100644
--- a/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
+++ b/src/Tgstation.Server.Host/Components/Session/SessionControllerFactory.cs
@@ -10,9 +10,9 @@ using Byond.TopicSender;
using Microsoft.Extensions.Logging;
-using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Internal;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Components.Byond;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Deployment;
diff --git a/src/Tgstation.Server.Host/Controllers/ApiController.cs b/src/Tgstation.Server.Host/Controllers/ApiController.cs
index f9e3868ada..b3d26b709f 100644
--- a/src/Tgstation.Server.Host/Controllers/ApiController.cs
+++ b/src/Tgstation.Server.Host/Controllers/ApiController.cs
@@ -22,6 +22,7 @@ using Serilog.Context;
using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Response;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Database;
using Tgstation.Server.Host.Extensions;
using Tgstation.Server.Host.Models;
diff --git a/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs b/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs
index 83eee22114..ec08e5ae7b 100644
--- a/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs
+++ b/src/Tgstation.Server.Host/Extensions/Converters/VersionConverter.cs
@@ -2,7 +2,7 @@
using Newtonsoft.Json;
-using Tgstation.Server.Api;
+using Tgstation.Server.Common.Extensions;
using YamlDotNet.Core;
using YamlDotNet.Core.Events;
diff --git a/src/Tgstation.Server.Host/IO/Console.cs b/src/Tgstation.Server.Host/IO/Console.cs
index 1b9e5fc8f9..0643ac9cab 100644
--- a/src/Tgstation.Server.Host/IO/Console.cs
+++ b/src/Tgstation.Server.Host/IO/Console.cs
@@ -3,19 +3,33 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using Tgstation.Server.Host.Extensions;
+using Tgstation.Server.Host.System;
namespace Tgstation.Server.Host.IO
{
///
sealed class Console : IConsole, IDisposable
{
+ ///
+ public string Title
+ {
+ get => platformIdentifier.IsWindows
+ ? global::System.Console.Title
+ : null;
+ set => global::System.Console.Title = value;
+ }
+
///
public bool Available => Environment.UserInteractive;
///
public CancellationToken CancelKeyPress => cancelKeyCts.Token;
+ ///
+ /// The for the .
+ ///
+ readonly IPlatformIdentifier platformIdentifier;
+
///
/// The for .
///
@@ -29,8 +43,11 @@ namespace Tgstation.Server.Host.IO
///
/// Initializes a new instance of the class.
///
- public Console()
+ /// The value of .
+ public Console(IPlatformIdentifier platformIdentifier)
{
+ this.platformIdentifier = platformIdentifier ?? throw new ArgumentNullException(nameof(platformIdentifier));
+
cancelKeyCts = new CancellationTokenSource();
global::System.Console.CancelKeyPress += (sender, e) =>
{
diff --git a/src/Tgstation.Server.Host/IO/IConsole.cs b/src/Tgstation.Server.Host/IO/IConsole.cs
index 8fbe368f39..605f3e421d 100644
--- a/src/Tgstation.Server.Host/IO/IConsole.cs
+++ b/src/Tgstation.Server.Host/IO/IConsole.cs
@@ -8,6 +8,11 @@ namespace Tgstation.Server.Host.IO
///
interface IConsole
{
+ ///
+ /// Gets or sets the window's title. Can return if getting the console title is not supported.
+ ///
+ string Title { get; set; }
+
///
/// If the is visible to the user.
///
diff --git a/src/Tgstation.Server.Host/Setup/SetupWizard.cs b/src/Tgstation.Server.Host/Setup/SetupWizard.cs
index 4b4654ca4b..dde11140f8 100644
--- a/src/Tgstation.Server.Host/Setup/SetupWizard.cs
+++ b/src/Tgstation.Server.Host/Setup/SetupWizard.cs
@@ -1073,8 +1073,18 @@ namespace Tgstation.Server.Host.Setup
await console.WriteAsync("Aborting setup!", true, default);
}
- // Link passed cancellationToken with cancel key press
Task finalTask = Task.CompletedTask;
+ string originalConsoleTitle = null;
+ void SetConsoleTitle()
+ {
+ if (originalConsoleTitle != null)
+ return;
+
+ originalConsoleTitle = console.Title;
+ console.Title = $"{assemblyInformationProvider.VersionString} Setup Wizard";
+ }
+
+ // Link passed cancellationToken with cancel key press
using (var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, console.CancelKeyPress))
using ((cancellationToken = cts.Token).Register(() => finalTask = HandleSetupCancel()))
try
@@ -1106,6 +1116,7 @@ namespace Tgstation.Server.Host.Setup
{
if (forceRun)
{
+ SetConsoleTitle();
await console.WriteAsync(String.Format(CultureInfo.InvariantCulture, "The configuration settings are requesting the setup wizard be run, but you already appear to have a configuration file ({0})!", userConfigFileName), true, cancellationToken);
forceRun = await PromptYesNo("Continue running setup wizard?", false, cancellationToken);
@@ -1115,6 +1126,8 @@ namespace Tgstation.Server.Host.Setup
return;
}
+ SetConsoleTitle();
+
// flush the logs to prevent console conflicts
await asyncDelayer.Delay(TimeSpan.FromSeconds(1), cancellationToken);
@@ -1123,6 +1136,8 @@ namespace Tgstation.Server.Host.Setup
finally
{
await finalTask;
+ if (originalConsoleTitle != null)
+ console.Title = originalConsoleTitle;
}
}
}
diff --git a/src/Tgstation.Server.Host/System/AssemblyInformationProvider.cs b/src/Tgstation.Server.Host/System/AssemblyInformationProvider.cs
index f074d50c4e..aa035c772f 100644
--- a/src/Tgstation.Server.Host/System/AssemblyInformationProvider.cs
+++ b/src/Tgstation.Server.Host/System/AssemblyInformationProvider.cs
@@ -2,7 +2,7 @@
using System.Net.Http.Headers;
using System.Reflection;
-using Tgstation.Server.Api;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Common;
namespace Tgstation.Server.Host.System
diff --git a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
index 5673e4096d..1b58a03bdd 100644
--- a/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
+++ b/src/Tgstation.Server.Host/Tgstation.Server.Host.csproj
@@ -140,7 +140,6 @@
-
diff --git a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs
index 367febec2f..3bd803b362 100644
--- a/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs
+++ b/src/Tgstation.Server.Host/Utils/SwaggerConfiguration.cs
@@ -16,6 +16,7 @@ using Swashbuckle.AspNetCore.SwaggerGen;
using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Response;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Controllers;
namespace Tgstation.Server.Host.Utils
diff --git a/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs b/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs
index 8347ca19f7..deb2fc1760 100644
--- a/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs
+++ b/tests/Tgstation.Server.Host.Tests/Extensions/Converters/TestVersionConverter.cs
@@ -1,7 +1,7 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
-using Tgstation.Server.Api;
+using Tgstation.Server.Common.Extensions;
using YamlDotNet.Serialization;
diff --git a/tests/Tgstation.Server.Host.Tests/IO/TestConsole.cs b/tests/Tgstation.Server.Host.Tests/IO/TestConsole.cs
index d093287c7a..f5878a7e2f 100644
--- a/tests/Tgstation.Server.Host.Tests/IO/TestConsole.cs
+++ b/tests/Tgstation.Server.Host.Tests/IO/TestConsole.cs
@@ -4,15 +4,23 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Tgstation.Server.Host.System;
+
namespace Tgstation.Server.Host.IO.Tests
{
[TestClass]
public sealed class TestConsole
{
+ [TestMethod]
+ public void TestContructionThrows()
+ {
+ Assert.ThrowsException(() => new Console(null));
+ }
+
[TestMethod]
public async Task TestWriteLine()
{
- var console = new Console();
+ var console = new Console(new PlatformIdentifier());
await Assert.ThrowsExceptionAsync(() => console.WriteAsync(null, false, default));
try
{
@@ -28,7 +36,7 @@ namespace Tgstation.Server.Host.IO.Tests
[TestMethod]
public void TestUserInteractive()
{
- var console = new Console();
+ var console = new Console(new PlatformIdentifier());
Assert.AreEqual(Environment.UserInteractive, console.Available);
}
}
diff --git a/tests/Tgstation.Server.Tests/Live/Instance/ByondTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/ByondTest.cs
index 68e89c0f9f..c4467ba34e 100644
--- a/tests/Tgstation.Server.Tests/Live/Instance/ByondTest.cs
+++ b/tests/Tgstation.Server.Tests/Live/Instance/ByondTest.cs
@@ -9,11 +9,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
-using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Request;
using Tgstation.Server.Client;
using Tgstation.Server.Client.Components;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Components.Byond;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.IO;
diff --git a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
index 82d61d7b05..2dbb2ca193 100644
--- a/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
+++ b/tests/Tgstation.Server.Tests/Live/Instance/WatchdogTest.cs
@@ -24,6 +24,7 @@ using Tgstation.Server.Api.Models.Request;
using Tgstation.Server.Api.Models.Response;
using Tgstation.Server.Client;
using Tgstation.Server.Client.Components;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Components.Chat;
using Tgstation.Server.Host.Components.Interop;
diff --git a/tests/Tgstation.Server.Tests/Live/RawRequestTests.cs b/tests/Tgstation.Server.Tests/Live/RawRequestTests.cs
index 02884dac07..a9023401ff 100644
--- a/tests/Tgstation.Server.Tests/Live/RawRequestTests.cs
+++ b/tests/Tgstation.Server.Tests/Live/RawRequestTests.cs
@@ -14,6 +14,7 @@ using Tgstation.Server.Api;
using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Response;
using Tgstation.Server.Client;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host;
namespace Tgstation.Server.Tests.Live
diff --git a/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs b/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs
index d373e2916e..962b39c049 100644
--- a/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs
+++ b/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs
@@ -31,6 +31,7 @@ using Tgstation.Server.Api.Models.Response;
using Tgstation.Server.Api.Rights;
using Tgstation.Server.Client;
using Tgstation.Server.Client.Components;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host.Components;
using Tgstation.Server.Host.Configuration;
using Tgstation.Server.Host.Database;
diff --git a/tests/Tgstation.Server.Tests/TestVersions.cs b/tests/Tgstation.Server.Tests/TestVersions.cs
index 8e206913ba..d5d0c6e881 100644
--- a/tests/Tgstation.Server.Tests/TestVersions.cs
+++ b/tests/Tgstation.Server.Tests/TestVersions.cs
@@ -9,6 +9,7 @@ using System.Xml.Linq;
using Tgstation.Server.Api;
using Tgstation.Server.Client;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Host;
using Tgstation.Server.Host.Components.Interop;
using Tgstation.Server.Host.Configuration;
diff --git a/tools/Tgstation.Server.Migrator.Comms/Program.cs b/tools/Tgstation.Server.Migrator.Comms/Program.cs
index cb8a68cfe3..8cebd477c7 100644
--- a/tools/Tgstation.Server.Migrator.Comms/Program.cs
+++ b/tools/Tgstation.Server.Migrator.Comms/Program.cs
@@ -15,6 +15,7 @@ using Tgstation.Server.Api.Models;
using Tgstation.Server.Api.Models.Internal;
using Tgstation.Server.Api.Models.Request;
using Tgstation.Server.Client;
+using Tgstation.Server.Common.Extensions;
static class Program
{
diff --git a/tools/Tgstation.Server.Migrator/Program.cs b/tools/Tgstation.Server.Migrator/Program.cs
index 046a6c7308..3332b5b52e 100644
--- a/tools/Tgstation.Server.Migrator/Program.cs
+++ b/tools/Tgstation.Server.Migrator/Program.cs
@@ -21,6 +21,7 @@ using Octokit;
using Tgstation.Server.Api;
using Tgstation.Server.Client;
+using Tgstation.Server.Common.Extensions;
using Tgstation.Server.Common.Http;
using Tgstation.Server.Host.Common;
using Tgstation.Server.Host.IO;