Skip to content

Commit d709346

Browse files
authored
Add support for VS 2026 to Nuke detection (#7843)
## Summary of changes Add VS 2026 search paths ## Reason for change We should be able to build with VS 2026 ## Implementation details Add `"18"` to the search paths (which is what VS 2026 uses) ## Test coverage Going to poke @vandonr 😄
1 parent 5b8194a commit d709346

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tracer/build/_build/NukeExtensions/DotNetSettingsExtensions.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@ public static MSBuildSettings SetMSBuildPath(this MSBuildSettings settings)
137137
catch
138138
{
139139
Logger.Information("MSBuild auto-detection failed, checking fallback paths");
140-
// favour the Preview version and x64 versions first
140+
// favour the Preview version, x64, and VS 2026 versions first
141141
var editions = new[] { "Preview", "Enterprise", "Professional", "Community", "BuildTools", };
142142
var programFiles = new[] { EnvironmentInfo.SpecialFolder(SpecialFolders.ProgramFiles), EnvironmentInfo.SpecialFolder(SpecialFolders.ProgramFilesX86)! };
143+
var vsVersions = new[] { "18", "2022" };
143144
var allPaths = (from edition in editions
144145
from root in programFiles
145-
select Path.Combine(root, $@"Microsoft Visual Studio\2022\{edition}\MSBuild\Current\Bin\msbuild.exe")).ToList();
146+
from version in vsVersions
147+
select Path.Combine(root, $@"Microsoft Visual Studio\{version}\{edition}\MSBuild\Current\Bin\msbuild.exe")).ToList();
146148
toolPath = allPaths.FirstOrDefault(File.Exists);
147149
if (toolPath is null)
148150
{

0 commit comments

Comments
 (0)