From c5a9b261c60fdb570f128f88e0c38a3c65f26afd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 15:48:01 +0000 Subject: [PATCH 1/7] [release/9.0.1xx] Upgrade latest Alpine to 3.21 for VMR builds (#45416) --- eng/pipelines/templates/variables/vmr-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/templates/variables/vmr-build.yml b/eng/pipelines/templates/variables/vmr-build.yml index 20b9c3badec1..27c5a7689f1b 100644 --- a/eng/pipelines/templates/variables/vmr-build.yml +++ b/eng/pipelines/templates/variables/vmr-build.yml @@ -15,9 +15,9 @@ variables: - name: almaLinuxContainer value: mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-8-source-build - name: alpineLatestContainer - value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-withnode + value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.21-amd64 - name: alpinePreviousContainer - value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.19-WithNode + value: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.20-withnode - name: centOSStreamContainer value: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9 - name: fedoraContainer @@ -50,9 +50,9 @@ variables: - name: almaLinuxName value: AlmaLinux8 - name: alpineLatestName - value: Alpine320 + value: Alpine321 - name: alpinePreviousName - value: Alpine319 + value: Alpine320 - name: centOSStreamName value: CentOSStream9 - name: fedoraName @@ -69,9 +69,9 @@ variables: - name: linuxMuslArm64Rid value: linux-musl-arm64 - name: alpineLatestX64Rid - value: alpine.3.20-x64 + value: alpine.3.21-x64 - name: alpinePreviousX64Rid - value: alpine.3.19-x64 + value: alpine.3.20-x64 - name: centOSStreamX64Rid value: centos.9-x64 - name: fedoraX64Rid From 20d85a19245625086e606ffdafb6d69d42d44e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Thu, 12 Dec 2024 10:28:35 -0800 Subject: [PATCH 2/7] Workaround for MSbuildProjectLoader.LoadProjectInfoAsync throwing on unrecognized project language (#44928) --- .../EnvironmentVariablesBuilder.cs | 2 +- .../HotReload/IncrementalMSBuildWorkspace.cs | 12 ++++- .../dotnet-watch/HotReloadDotNetWatcher.cs | 11 ++++ .../HotReload/ApplyDeltaTests.cs | 54 +++++++++++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs index da2e1ec10e99..37f17e94c315 100644 --- a/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs +++ b/src/BuiltInTools/dotnet-watch/EnvironmentVariablesBuilder.cs @@ -60,7 +60,7 @@ public void SetVariable(string name, string value) public void ConfigureProcess(ProcessSpec processSpec) { - processSpec.Arguments = [.. GetCommandLineDirectives(), .. processSpec.Arguments]; + processSpec.Arguments = [.. GetCommandLineDirectives(), .. processSpec.Arguments ?? []]; AddToEnvironment(processSpec.EnvironmentVariables); } diff --git a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs index 90ec68694946..d508f7338bd9 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/IncrementalMSBuildWorkspace.cs @@ -38,7 +38,17 @@ public async Task UpdateProjectConeAsync(string rootProjectPath, CancellationTok var loader = new MSBuildProjectLoader(this); var projectMap = ProjectMap.Create(); - var projectInfos = await loader.LoadProjectInfoAsync(rootProjectPath, projectMap, progress: null, msbuildLogger: null, cancellationToken).ConfigureAwait(false); + + ImmutableArray projectInfos; + try + { + projectInfos = await loader.LoadProjectInfoAsync(rootProjectPath, projectMap, progress: null, msbuildLogger: null, cancellationToken).ConfigureAwait(false); + } + catch (InvalidOperationException) + { + // TODO: workaround for https://github.com/dotnet/roslyn/issues/75956 + projectInfos = []; + } var oldProjectIdsByPath = oldSolution.Projects.ToDictionary(keySelector: static p => p.FilePath!, elementSelector: static p => p.Id); diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs index da4f09764958..fd40213ace83 100644 --- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs @@ -91,6 +91,7 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke var rootProjectOptions = Context.RootProjectOptions; var rootProjectNode = Context.ProjectGraph.GraphRoots.Single(); + var rootProjectCapabilities = rootProjectNode.GetCapabilities(); await using var runtimeProcessLauncher = _runtimeProcessLauncherFactory?.TryCreate(rootProjectNode, projectLauncher, rootProjectOptions.BuildProperties); if (runtimeProcessLauncher != null) @@ -211,6 +212,16 @@ public override async Task WatchAsync(CancellationToken shutdownCancellationToke await compilationHandler.Workspace.UpdateFileContentAsync(changedFiles, iterationCancellationToken); } + if (!rootProjectCapabilities.Contains("SupportsHotReload")) + { + Context.Reporter.Warn($"Project '{rootProjectNode.GetDisplayName()}' does not support Hot Reload and must be rebuilt."); + + // file change already detected + waitForFileChangeBeforeRestarting = false; + iterationCancellationSource.Cancel(); + break; + } + HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.Main); var stopwatch = Stopwatch.StartNew(); diff --git a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs index 2ad317fad6ba..23f3076915a9 100644 --- a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs +++ b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs @@ -68,6 +68,60 @@ public static void Print() await App.AssertOutputLineStartsWith("Changed!"); } + [Fact] + public async Task ChangeFileInFSharpProject() + { + var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple") + .WithSource(); + + App.Start(testAsset, []); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForFileChangeBeforeRestarting); + + UpdateSourceFile(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "")); + + await App.AssertOutputLineStartsWith(""); + } + + [Fact] + public async Task ChangeFileInFSharpProjectWithLoop() + { + var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple") + .WithSource(); + + var source = """ + module ConsoleApplication.Program + + open System + open System.Threading + + [] + let main argv = + while true do + printfn "Waiting" + Thread.Sleep(200) + 0 + """; + + var sourcePath = Path.Combine(testAsset.Path, "Program.fs"); + + File.WriteAllText(sourcePath, source); + + App.Start(testAsset, []); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges); + + UpdateSourceFile(sourcePath, content => content.Replace("Waiting", "")); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges, failure: _ => false); + await App.AssertOutputLineStartsWith(""); + + UpdateSourceFile(sourcePath, content => content.Replace("", "")); + + await App.AssertOutputLineStartsWith(MessageDescriptor.WaitingForChanges, failure: _ => false); + await App.AssertOutputLineStartsWith(""); + } + // Test is timing out on .NET Framework: https://github.com/dotnet/sdk/issues/41669 [CoreMSBuildOnlyFact] public async Task HandleTypeLoadFailure() From 98092045a17eeb66a44b7b1255bc7a2fbcfd196b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Thu, 12 Dec 2024 10:28:57 -0800 Subject: [PATCH 3/7] Refresh browser for all transitively referencing projects (#45096) --- .../HotReload/CompilationHandler.cs | 2 +- .../HotReload/ScopedCssFileHandler.cs | 61 +++++++++++++------ .../Utilities/ProjectGraphNodeExtensions.cs | 24 ++++++++ 3 files changed, 66 insertions(+), 21 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs index cdfc4cf3f9c2..e05e9478a90c 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/CompilationHandler.cs @@ -348,7 +348,7 @@ private async ValueTask DisplayResultsAsync(WatchHotReloadService.Updates update switch (updates.Status) { case ModuleUpdateStatus.None: - _reporter.Output("No hot reload changes to apply."); + _reporter.Output("No C# changes to apply."); break; case ModuleUpdateStatus.Ready: diff --git a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs index 3a6961854987..7d7a79644f9f 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/ScopedCssFileHandler.cs @@ -5,6 +5,7 @@ using System.Collections; using System.Diagnostics; using Microsoft.Build.Graph; +using Microsoft.Build.Framework; using Microsoft.DotNet.Watcher.Internal; using Microsoft.Extensions.Tools.Internal; @@ -52,41 +53,61 @@ public async ValueTask HandleFileChangesAsync(IReadOnlyList files, } } - var logger = reporter.IsVerbose ? new[] { new Build.Logging.ConsoleLogger() } : null; + if (!hasApplicableFiles) + { + return; + } + + var logger = reporter.IsVerbose ? new[] { new Build.Logging.ConsoleLogger(LoggerVerbosity.Minimal) } : null; - var tasks = projectsToRefresh.Select(async projectNode => + var buildTasks = projectsToRefresh.Select(projectNode => Task.Run(() => { - if (!projectNode.ProjectInstance.DeepCopy().Build(BuildTargetName, logger)) + try { - return false; + if (!projectNode.ProjectInstance.DeepCopy().Build(BuildTargetName, logger)) + { + return null; + } } - - if (browserConnector.TryGetRefreshServer(projectNode, out var browserRefreshServer)) + catch (Exception e) { - await HandleBrowserRefresh(browserRefreshServer, projectNode.ProjectInstance.FullPath, cancellationToken); + reporter.Error($"[{projectNode.GetDisplayName()}] Target {BuildTargetName} failed to build: {e}"); + return null; } - return true; - }); + return projectNode; + })); - var results = await Task.WhenAll(tasks).WaitAsync(cancellationToken); + var buildResults = await Task.WhenAll(buildTasks).WaitAsync(cancellationToken); - if (hasApplicableFiles) + var browserRefreshTasks = buildResults.Where(p => p != null)!.GetTransitivelyReferencingProjects().Select(async projectNode => { - var successfulCount = results.Sum(r => r ? 1 : 0); - - if (successfulCount == results.Length) - { - reporter.Output("Hot reload of scoped css succeeded.", emoji: "🔥"); - } - else if (successfulCount > 0) + if (browserConnector.TryGetRefreshServer(projectNode, out var browserRefreshServer)) { - reporter.Output($"Hot reload of scoped css partially succeeded: {successfulCount} project(s) out of {results.Length} were updated.", emoji: "🔥"); + reporter.Verbose($"[{projectNode.GetDisplayName()}] Refreshing browser."); + await HandleBrowserRefresh(browserRefreshServer, projectNode.ProjectInstance.FullPath, cancellationToken); } else { - reporter.Output("Hot reload of scoped css failed.", emoji: "🔥"); + reporter.Verbose($"[{projectNode.GetDisplayName()}] No refresh server."); } + }); + + await Task.WhenAll(browserRefreshTasks).WaitAsync(cancellationToken); + + var successfulCount = buildResults.Sum(r => r != null ? 1 : 0); + + if (successfulCount == buildResults.Length) + { + reporter.Output("Hot reload of scoped css succeeded.", emoji: "🔥"); + } + else if (successfulCount > 0) + { + reporter.Output($"Hot reload of scoped css partially succeeded: {successfulCount} project(s) out of {buildResults.Length} were updated.", emoji: "🔥"); + } + else + { + reporter.Output("Hot reload of scoped css failed.", emoji: "🔥"); } } diff --git a/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs b/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs index 762811f2d372..5bf18b604449 100644 --- a/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs +++ b/src/BuiltInTools/dotnet-watch/Utilities/ProjectGraphNodeExtensions.cs @@ -31,4 +31,28 @@ public static bool IsNetCoreApp(this ProjectGraphNode projectNode, Version minVe public static IEnumerable GetCapabilities(this ProjectGraphNode projectNode) => projectNode.ProjectInstance.GetItems("ProjectCapability").Select(item => item.EvaluatedInclude); + + public static IEnumerable GetTransitivelyReferencingProjects(this IEnumerable projects) + { + var visited = new HashSet(); + var queue = new Queue(); + foreach (var project in projects) + { + queue.Enqueue(project); + } + + while (queue.Count > 0) + { + var project = queue.Dequeue(); + if (visited.Add(project)) + { + foreach (var referencingProject in project.ReferencingProjects) + { + queue.Enqueue(referencingProject); + } + } + } + + return visited; + } } From 40c57deac41f37f335228b363e2531ce22540cdb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:46:49 -0800 Subject: [PATCH 4/7] [release/9.0.1xx] Fix incorrect apphost being used when publishing for self-contained single-file with `NoBuild=true` (#45400) The `_GetAppHostCreationConfiguration` target sets the `_UseSingleFileHostForPublish` property, which determines if we (re-)create the app using `singlefilehost` on publish. When publishing with `NoBuild=true`, the target was not being run, so we bundled using `apphost`, resulting in an app that was configured to be self-contained but did not actually have the runtime as part of itself. This change chains the target into the computation for output paths to ensure that the target runs when publishing without building, so that the correct host is used. --- .../targets/Microsoft.NET.Sdk.targets | 8 ++-- .../GivenThatWeWantToPublishASingleFileApp.cs | 38 +++++++++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index d8ebcd1db6a9..5ed3f7db26a5 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -790,9 +790,9 @@ Copyright (c) .NET Foundation. All rights reserved. diff --git a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs index c4b7f6395581..bcb21aeb7fec 100644 --- a/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs +++ b/test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishASingleFileApp.cs @@ -551,6 +551,44 @@ public void It_does_not_rewrite_the_single_file_unnecessarily() fileWriteTimeAfterSecondRun.Should().Be(fileWriteTimeAfterFirstRun); } + [RequiresMSBuildVersionFact("16.8.0")] + public void It_uses_appropriate_host_on_selfcontained_publish_with_no_build() + { + var testProject = new TestProject() + { + Name = "SingleFileTest", + TargetFrameworks = ToolsetInfo.CurrentTargetFramework, + RuntimeIdentifier = RuntimeInformation.RuntimeIdentifier, + IsExe = true, + }; + testProject.AdditionalProperties.Add("SelfContained", "true"); + TestAsset testAsset = _testAssetsManager.CreateTestProject(testProject); + + // Build will create app using apphost + var buildCommand = new BuildCommand(testAsset); + buildCommand + .Execute() + .Should() + .Pass(); + + // Publish without build should create app using singlefilehost + var publishCommand = new PublishCommand(testAsset); + publishCommand + .Execute(PublishSingleFile, "/p:NoBuild=true") + .Should() + .Pass(); + string singleFilePath = Path.Combine( + GetPublishDirectory(publishCommand).FullName, + $"{testProject.Name}{Constants.ExeSuffix}"); + + // Make sure published app runs correctly + var command = new RunExeCommand(Log, singleFilePath); + command.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining("Hello World"); + } + [RequiresMSBuildVersionFact("16.8.0")] public void It_rewrites_the_apphost_for_single_file_publish() { From 0d5696626019b1780706ef2c98f9cfc6189b596b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Matou=C5=A1ek?= Date: Fri, 13 Dec 2024 14:10:30 -0800 Subject: [PATCH 5/7] Fix `Change failed to apply (error code: ...)` intermittent failures (#45097) --- .../dotnet-watch/HotReload/DefaultDeltaApplier.cs | 5 +++-- .../SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs | 2 +- test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs index ca0fe1297410..4c703612ffb3 100644 --- a/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs +++ b/src/BuiltInTools/dotnet-watch/HotReload/DefaultDeltaApplier.cs @@ -136,10 +136,11 @@ private async Task ReceiveApplyUpdateResult(CancellationToken cancellation var status = ArrayPool.Shared.Rent(1); try { - var statusBytesRead = await _pipe.ReadAsync(status, cancellationToken); + var statusBytesRead = await _pipe.ReadAsync(status, offset: 0, count: 1, cancellationToken); if (statusBytesRead != 1 || status[0] != UpdatePayload.ApplySuccessValue) { - Reporter.Error($"Change failed to apply (error code: '{BitConverter.ToString(status, 0, statusBytesRead)}'). Further changes won't be applied to this process."); + var message = (statusBytesRead == 0) ? "received no data" : $"received status 0x{status[0]:x2}"; + Reporter.Error($"Change failed to apply ({message}). Further changes won't be applied to this process."); return false; } diff --git a/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs b/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs index 99f111f3c177..24b8237217b1 100644 --- a/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs +++ b/test/HelixTasks/SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs @@ -152,7 +152,7 @@ private async Task> PrepareWorkItem(ITaskItem xunitProject) var testFilter = string.IsNullOrEmpty(assemblyPartitionInfo.ClassListArgumentString) ? "" : $"--filter \"{assemblyPartitionInfo.ClassListArgumentString}\""; command = $"{driver} test {assemblyName} -e HELIX_WORK_ITEM_TIMEOUT={timeout} {testExecutionDirectory} {msbuildAdditionalSdkResolverFolder} " + - $"{(XUnitArguments != null ? " " + XUnitArguments : "")} --results-directory .{Path.DirectorySeparatorChar} --logger trx --blame-hang --blame-hang-timeout 30m {testFilter} -- {arguments}"; + $"{(XUnitArguments != null ? " " + XUnitArguments : "")} --results-directory .{Path.DirectorySeparatorChar} --logger trx --logger \"console;verbosity=detailed\" --blame-hang --blame-hang-timeout 30m {testFilter} -- {arguments}"; Log.LogMessage($"Creating work item with properties Identity: {assemblyName}, PayloadDirectory: {publishDirectory}, Command: {command}"); diff --git a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs index 23f3076915a9..1ced8644525a 100644 --- a/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs +++ b/test/dotnet-watch.Tests/HotReload/ApplyDeltaTests.cs @@ -68,7 +68,7 @@ public static void Print() await App.AssertOutputLineStartsWith("Changed!"); } - [Fact] + [Fact(Skip = "https://github.com/dotnet/sdk/issues/45457")] public async Task ChangeFileInFSharpProject() { var testAsset = TestAssets.CopyTestAsset("FSharpTestAppSimple") From 84a453a25e0b5b4de725a2003c22346b4c636f5c Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 27 Dec 2024 04:05:11 -0800 Subject: [PATCH 6/7] [release/9.0.1xx] dotnetcli.azureedge.net -> builds.dotnet.microsoft.com (#45621) --- eng/pipelines/templates/jobs/vmr-build.yml | 2 +- src/SourceBuild/content/prep-source-build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 58a38d4c2168..28d20caed157 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -227,7 +227,7 @@ jobs: if [[ $archiveVersionLine =~ $versionPattern ]]; then archiveVersion="${BASH_REMATCH[1]}" - archiveUrl="https://dotnetcli.azureedge.net/source-built-artifacts/sdks/dotnet-sdk-$archiveVersion-${{ parameters.artifactsRid }}.tar.gz" + archiveUrl="https://builds.dotnet.microsoft.com/source-built-artifacts/sdks/dotnet-sdk-$archiveVersion-${{ parameters.artifactsRid }}.tar.gz" downloadDir="$(sourcesPath)/prereqs/packages/archive/" echo "Downloading source-built SDK from $archiveUrl..." diff --git a/src/SourceBuild/content/prep-source-build.sh b/src/SourceBuild/content/prep-source-build.sh index 0f4d1d551a03..1af4fe06cf94 100755 --- a/src/SourceBuild/content/prep-source-build.sh +++ b/src/SourceBuild/content/prep-source-build.sh @@ -163,7 +163,7 @@ function DownloadArchive { archiveRid=$artifactsRid fi - archiveUrl="https://dotnetcli.azureedge.net/source-built-artifacts/assets/Private.SourceBuilt.$archiveType.$archiveVersion.$archiveRid.tar.gz" + archiveUrl="https://builds.dotnet.microsoft.com/source-built-artifacts/assets/Private.SourceBuilt.$archiveType.$archiveVersion.$archiveRid.tar.gz" echo " Downloading source-built $archiveType from $archiveUrl..." (cd "$packagesArchiveDir" && curl -f --retry 5 -O "$archiveUrl") From ac104978619265b8ccd230737ffcf8e9e9c6efc1 Mon Sep 17 00:00:00 2001 From: Jason Zhai Date: Sun, 29 Dec 2024 23:40:11 -0800 Subject: [PATCH 7/7] Remove duplicate code --- .../dotnet-watch/HotReloadDotNetWatcher.cs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs index 6d6a2352230f..e0f7ae1115f0 100644 --- a/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs +++ b/src/BuiltInTools/dotnet-watch/HotReloadDotNetWatcher.cs @@ -250,16 +250,6 @@ void FileChangedCallback(ChangedPath change) break; } - if (!rootProjectCapabilities.Contains("SupportsHotReload")) - { - Context.Reporter.Warn($"Project '{rootProjectNode.GetDisplayName()}' does not support Hot Reload and must be rebuilt."); - - // file change already detected - waitForFileChangeBeforeRestarting = false; - iterationCancellationSource.Cancel(); - break; - } - HotReloadEventSource.Log.HotReloadStart(HotReloadEventSource.StartType.Main); var stopwatch = Stopwatch.StartNew();