Repository navigation
Update RetrievalOfCpuCores to .NET 11 and System.Management 11.0.0 - #2411
Merged
vladimir-pecanac-main merged 2 commits intoNov 15, 2026
Conversation
Retarget both projects to net11.0, move System.Management off the 9.0 preview to 11.0.0, update MSTest to 4.5.3. Dispose ManagementObjectSearcher, read WMI values with Convert.ToInt32, rename the device-count method to GetLogicalProcessorsIncludingExcluded and add GetExcludedProcessors. Windows-only tests carry the Live suffix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retargets the RetrievalOfCpuCores sample and its tests to net11.0, replaces the System.Management 9.0 preview with the stable 11.0.0 release and moves MSTest to 4.5.3 with Test.Sdk 18.12.0 and coverlet 10.1.0. The WMI methods now dispose their ManagementObjectSearcher and read values with Convert.ToInt32, the SetupAPI device count is renamed GetLogicalProcessorsIncludingExcluded, a new GetExcludedProcessors subtracts the WMI logical count from it, Program.cs prints the new method and a ParallelOptions example, and the logical processor test now checks that ProcessorCount is at most the WMI count. The six Windows-only tests end in _Live so the Linux CI filter skips them.