From 3262a4ee88e3c73e3c51d6100181af3a41d9a9cd Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Tue, 10 Aug 2021 19:36:35 -0400 Subject: [PATCH] When installing non-stable channel, pick dev17/vs2022 Fixes #104 --- src/VisualStudio/InstallerService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/VisualStudio/InstallerService.cs b/src/VisualStudio/InstallerService.cs index bcbf3e8..ced0648 100644 --- a/src/VisualStudio/InstallerService.cs +++ b/src/VisualStudio/InstallerService.cs @@ -26,7 +26,10 @@ public Task ModifyAsync(string channelUri, Sku? sku, IEnumerable args, T => RunAsync("modify", channelUri, sku, args, output); Task RunAsync(string command, Channel? channel, Sku? sku, IEnumerable args, TextWriter output) - => RunAsync(command, "https://aka.ms/vs/16/" + MapChannel(channel), sku, args, output); + { + var vs = channel == null || channel == Channel.Release ? "16" : "17"; + return RunAsync(command, $"https://aka.ms/vs/{vs}/{MapChannel(channel)}", sku, args, output); + } async Task RunAsync(string command, string channelUri, Sku? sku, IEnumerable args, TextWriter output) {