public async Task <List <NGenAssemblyData> > GetNGenAssemblyDataAsync(Build build) { VerifyBuild(build); var uri = DevOpsUtil.GetBuildUri(build); Logger.LogInformation($"Processing {build.Id} - {uri}"); // Newer builds have the NGEN logs in a separate artifact altogether to decrease the time needed // to downloaad them. Try that first and fall back to the diagnostic logs if it doesn't exist. MemoryStream stream; Func <ZipArchiveEntry, bool> predicate; try { Logger.LogInformation("Downloading NGEN logs"); stream = await DevOpsServer.DownloadArtifactAsync(ProjectName, build.Id, "NGen Logs"); predicate = e => !string.IsNullOrEmpty(e.Name); } catch (Exception) { Logger.LogInformation("Falling back to diagnostic logs"); stream = await DevOpsServer.DownloadArtifactAsync(ProjectName, build.Id, "Build Diagnostic Files"); predicate = e => !string.IsNullOrEmpty(e.Name) && e.FullName.StartsWith("Build Diagnostic Files/ngen/"); } return(await GetFromStream(stream, predicate)); }