diff --git a/src/Runner.Listener/Configuration/ConfigurationManager.cs b/src/Runner.Listener/Configuration/ConfigurationManager.cs
index 05b93cb58..e83eab1e1 100644
--- a/src/Runner.Listener/Configuration/ConfigurationManager.cs
+++ b/src/Runner.Listener/Configuration/ConfigurationManager.cs
@@ -404,6 +404,20 @@ namespace GitHub.Runner.Listener.Configuration
}
}
+ // allow the server to override the serverUrlV2 and useV2Flow
+ if (agent.Properties.TryGetValue("ServerUrlV2", out string serverUrlV2) &&
+ !string.IsNullOrEmpty(serverUrlV2))
+ {
+ Trace.Info($"Service enforced serverUrlV2: {serverUrlV2}");
+ runnerSettings.ServerUrlV2 = serverUrlV2;
+ }
+
+ if (agent.Properties.TryGetValue("UseV2Flow", out bool useV2Flow) && useV2Flow)
+ {
+ Trace.Info($"Service enforced useV2Flow: {useV2Flow}");
+ runnerSettings.UseV2Flow = useV2Flow;
+ }
+
_term.WriteSection("Runner settings");
// We will Combine() what's stored with root. Defaults to string a relative path
diff --git a/src/Sdk/Sdk.csproj b/src/Sdk/Sdk.csproj
index 5f2c3fd55..41f63ce3e 100644
--- a/src/Sdk/Sdk.csproj
+++ b/src/Sdk/Sdk.csproj
@@ -18,7 +18,6 @@
-