diff --git a/buildsystem/build.cake b/buildsystem/build.cake index ee1fe4439ab54639465155cde33a29125a90f7be..0e2282043e4c96a6baa9fa9943174685a5c01c5a 100644 --- a/buildsystem/build.cake +++ b/buildsystem/build.cake @@ -149,13 +149,18 @@ async Task DownloadArtifact(string arch) Console.WriteLine("Found the nightly artifact URL"); - using (var webClient = new WebClient()) + using (var httpClient = new HttpClient()) { url = $"{baseUrl}{arch}/{todayPartialLink}{todayLinkEnding}"; Console.WriteLine($"requesting {url}"); - webClient.DownloadProgressChanged += (s, e) => Console.Write($"\r{e.ProgressPercentage}%"); - await webClient.DownloadFileTaskAsync(url, $"../artifacts/{artifact}{ext}"); + using (var stream = await httpClient.GetStreamAsync(url)) + { + using (var fs = new FileStream($"../artifacts/{artifact}{ext}", FileMode.CreateNew)) + { + await stream.CopyToAsync(fs); + } + } Console.WriteLine(Environment.NewLine); Console.WriteLine("Done..."); }