Repository navigation
Fix Windows SDK package feature naming conflict and DevCheck VS 2026 support #6951
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Scott Jones (Scottj1s)
merged 3 commits into
main
from
Scottj1s/fix-package-feature-sdk-conflict
Nov 16, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "version": "1.0", | ||
| "components": [ | ||
| "Microsoft.VisualStudio.Component.NuGet", | ||
| "Microsoft.VisualStudio.Component.Roslyn.Compiler", | ||
| "Microsoft.Component.MSBuild", | ||
| "Microsoft.Net.Component.4.8.SDK", | ||
| "Microsoft.Net.Component.4.8.TargetingPack", | ||
| "Microsoft.VisualStudio.ComponentGroup.MSIX.Packaging", | ||
| "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", | ||
| "Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64", | ||
| "Microsoft.VisualStudio.Component.VC.14.44.17.14.ARM64", | ||
| "Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64.Spectre", | ||
| "Microsoft.VisualStudio.Component.VC.14.44.17.14.ARM64.Spectre" | ||
| ] | ||
| } |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Copyright (c) Microsoft Corporation. | ||
| # Licensed under the MIT License. | ||
| Set-StrictMode -Version 2.0 | ||
| $ErrorActionPreference = 'Stop' | ||
|
|
||
| $root = (Resolve-Path (Join-Path $PSScriptRoot '..\..')).Path | ||
| $ast = [System.Management.Automation.Language.Parser]::ParseFile( | ||
| "$root\tools\DevCheck\DevCheck.ps1", [ref]$null, [ref]$null) | ||
| $names = @('Get-VisualStudioInstallPath', 'Test-VisualStudioInstall', | ||
| 'Test-VisualStudioComponent', 'Test-VisualStudioComponents') | ||
| foreach ($node in $ast.FindAll({ | ||
| param($node) | ||
| $node -is [System.Management.Automation.Language.FunctionDefinitionAst] | ||
| }, $true)) { | ||
| if ($node.Name -in $names) { | ||
| . ([scriptblock]::Create($node.Extent.Text)) | ||
| } | ||
| } | ||
|
|
||
| function Get-ProjectRoot { return $root } | ||
| function Get-VSWhere { return 'vswhere.exe' } | ||
| function Run-Process { | ||
| param([string]$exe, [string]$arguments, [int]$throwIfExitCodeIsFailure = 0) | ||
| if ($arguments -match '-format json') { return $script:instanceJson } | ||
| if ($arguments -notmatch [regex]::Escape("[$global:vsversion,$global:vsversion]")) { | ||
| throw 'Component query was not scoped to the selected version' | ||
| } | ||
| $component = [regex]::Match($arguments, '-requires (\S+)').Groups[1].Value | ||
| if ($script:overrides.ContainsKey($component)) { return $script:overrides[$component] } | ||
| return "$global:vspath`r`n" | ||
| } | ||
| function Assert([bool]$condition, [string]$message) { | ||
| if (-not $condition) { throw $message } | ||
| } | ||
| function Set-Instance([int]$major) { | ||
| $script:instanceJson = ConvertTo-Json -InputObject @(@{ | ||
| installationPath = "C:\VS$major" | ||
| installationVersion = "$major.14.123.4" | ||
| }) | ||
| $script:overrides = @{} | ||
| $global:issues = 0 | ||
| $global:vspath = '' | ||
| $global:vsversion = $null | ||
| } | ||
|
|
||
| foreach ($major in @(17, 18)) { | ||
| Set-Instance $major | ||
| Assert (Test-VisualStudioInstall) "VS $major discovery failed" | ||
| Assert (Test-VisualStudioComponents) "VS $major component check failed" | ||
| Assert ($global:issues -eq 0) "VS $major incorrectly reported issues" | ||
|
|
||
| Set-Instance $major | ||
| $null = Test-VisualStudioInstall | ||
| $script:overrides['Microsoft.Component.MSBuild'] = '' | ||
| Assert (-not (Test-VisualStudioComponents)) "VS $major missing component was accepted" | ||
| Assert ($global:issues -eq 1) "VS $major missing component was not counted for exit status" | ||
|
|
||
| Set-Instance $major | ||
| $null = Test-VisualStudioInstall | ||
| $script:overrides['Microsoft.VisualStudio.Component.NuGet'] = "C:\AnotherVS`r`n" | ||
| Assert (-not (Test-VisualStudioComponents)) "VS $major accepted a component from a different installation" | ||
| Assert ($global:issues -eq 1) "VS $major split-install failure was not counted" | ||
|
|
||
| Set-Instance $major | ||
| $null = Test-VisualStudioInstall | ||
| $script:instanceJson = '[]' | ||
| Assert (-not (Test-VisualStudioInstall)) "VS $major no-installation case was accepted" | ||
| Assert ($global:issues -eq 1) "VS $major no-installation failure was not counted" | ||
| Assert ([string]::IsNullOrEmpty($global:vspath)) "VS $major stale installation path survived" | ||
| Assert ($null -eq $global:vsversion) "VS $major stale installation version survived" | ||
| } | ||
|
|
||
| Set-Instance 17 | ||
| $null = Test-VisualStudioInstall | ||
| foreach ($component in @( | ||
| 'Microsoft.NetCore.Component.Runtime.6.0', | ||
| 'Microsoft.NetCore.Component.Runtime.7.0', | ||
| 'Microsoft.VisualStudio.Component.LiveUnitTesting', | ||
| 'Component.Microsoft.VisualStudio.LiveShare.2022', | ||
| 'Microsoft.VisualStudio.Component.IntelliCode' | ||
| )) { | ||
| $script:overrides[$component] = '' | ||
| } | ||
| Assert (Test-VisualStudioComponents) 'Build-ready VS2022 was rejected without obsolete runtimes or optional IDE features' | ||
| Assert ($global:issues -eq 0) 'Optional VS2022 components incorrectly reported issues' | ||
|
|
||
| Write-Output 'PASS: VS2022, VS2026, VS2022 pipeline image, missing component, split installations, and no installation' | ||
| exit 0 | ||
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.
Uh oh!
There was an error while loading. Please reload this page.