From e61ffd3bb6b70ccba37ff49530eb732bc1a4938d Mon Sep 17 00:00:00 2001 From: Alex Williams-Ferreira Date: Mon, 9 Nov 2026 12:46:27 -0800 Subject: [PATCH 1/2] Fix Windows CPU affinity runtime detection Use a runtime Windows check so plain .NET targets can set process affinity on Windows while preserving rejection on other platforms. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/VirtualClient/VirtualClient.Common/ProcessProxy.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/VirtualClient/VirtualClient.Common/ProcessProxy.cs b/src/VirtualClient/VirtualClient.Common/ProcessProxy.cs index d01609c80f..3720948426 100644 --- a/src/VirtualClient/VirtualClient.Common/ProcessProxy.cs +++ b/src/VirtualClient/VirtualClient.Common/ProcessProxy.cs @@ -316,11 +316,12 @@ public virtual bool Start() /// The processor affinity bitmask. public virtual void SetProcessorAffinity(IntPtr affinityMask) { -#if WINDOWS + if (!OperatingSystem.IsWindows()) + { + throw new PlatformNotSupportedException("Setting processor affinity is only supported on Windows platform."); + } + this.UnderlyingProcess.ProcessorAffinity = affinityMask; -#else - throw new PlatformNotSupportedException("Setting processor affinity is only supported on Windows platform."); -#endif } /// From 6ebe12c16d55fa9b187bea50551206bdd1f89dfc Mon Sep 17 00:00:00 2001 From: AlexWFMS <275845050+AlexWFMS@users.noreply.github.com> Date: Thu, 12 Nov 2026 23:49:52 +0000 Subject: [PATCH 2/2] Bump VirtualClient patch version to 3.5.16 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ad94b3eff7..7a38b4ee47 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.15 \ No newline at end of file +3.5.16 \ No newline at end of file