From a3caae3d6dc94df35c59798c88c963d3e7799c30 Mon Sep 17 00:00:00 2001 From: Igor Velikorossov Date: Thu, 1 Aug 2024 12:12:05 +1000 Subject: [PATCH 1/3] Update building.md Document how to resolve "workload manifest microsoft.net.sdk.aspire not installed" issue --- docs/building.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/building.md b/docs/building.md index 5d042c9bf87..b7845cd6945 100644 --- a/docs/building.md +++ b/docs/building.md @@ -157,6 +157,15 @@ This sets up necessary environmental variables and opens the repository in VS Co * When restoring packages, if you get the following message: "The SSL connection could not be established, see inner exception. Unable to read data from the transport connection", try disabling IPv6 on your network adapter. * When the public API surface is updated, you need to update the API baselines manifest files for the impacted assemblies. [Here is an example](https://github.com/dotnet/extensions/blob/3e6ac0735cb62d4c8b63e131d956397a87ea26f7/src/Libraries/Microsoft.Extensions.AsyncState/Microsoft.Extensions.AsyncState.json) for the `Microsoft.Extensions.AsyncState` project. To update the manifest of all the local assemblies, invoke the script `./scripts/MakeApiBaselines.ps1`. +#### How to fix "Workload manifest microsoft.net.sdk.aspire not installed"? + +At times, during restore you may receive the following error: +``` +error MSB4242: SDK Resolver Failure: "The SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" failed while attempting to resolve the SDK "Microsoft.DotNet.Arcade.Sdk". +Exception: "System.IO.FileNotFoundException: Workload manifest microsoft.net.sdk.aspire: 8.0.1/8.0.100 from workload version was not installed. Running "dotnet workload repair" may resolve this. +``` + +This error is, generally, caused by multiple SDK installations under \/.dotnet folder. To resolve the issue, run `git clean -xdf` and then run restore again. --- From 68a79b51556ca901f56b11186fa70d04168b77cb Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Fri, 2 Aug 2024 05:20:25 +0100 Subject: [PATCH 2/3] Fix NullReferenceException in Timer disposal (#5321) Protect against `NullReferenceException` when disposing of `Timer`. Resolves #5316. --- .../Timer.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/Timer.cs b/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/Timer.cs index c6d7bf5ab1f..926e500166f 100644 --- a/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/Timer.cs +++ b/src/Libraries/Microsoft.Extensions.TimeProvider.Testing/Timer.cs @@ -37,16 +37,18 @@ public bool Change(TimeSpan dueTime, TimeSpan period) _ = Throw.IfOutOfRange(periodMs, -1, MaxSupportedTimeout, nameof(period)); #pragma warning restore S3236 // Caller information arguments should not be provided explicitly - if (_timeProvider == null) + var timeProvider = _timeProvider; + if (timeProvider is null) { // timer has been disposed return false; } - if (_waiter != null) + var waiter = _waiter; + if (waiter is not null) { // remove any previous waiter - _timeProvider.RemoveWaiter(_waiter); + timeProvider.RemoveWaiter(waiter); _waiter = null; } @@ -62,8 +64,8 @@ public bool Change(TimeSpan dueTime, TimeSpan period) period = TimeSpan.Zero; } - _waiter = new Waiter(_callback!, _state, period.Ticks); - _timeProvider.AddWaiter(_waiter, dueTime.Ticks); + _waiter = waiter = new Waiter(_callback!, _state, period.Ticks); + timeProvider.AddWaiter(waiter, dueTime.Ticks); return true; } @@ -89,9 +91,10 @@ public ValueTask DisposeAsync() private void Dispose(bool _) { - if (_waiter != null) + var waiter = _waiter; + if (waiter is not null) { - _timeProvider!.RemoveWaiter(_waiter); + _timeProvider?.RemoveWaiter(waiter); _waiter = null; } From 601ec1e7db8a8576472b999025174284f826b104 Mon Sep 17 00:00:00 2001 From: Dan Espinosa <30415120+danespinosa@users.noreply.github.com> Date: Sun, 4 Aug 2024 16:19:22 -0700 Subject: [PATCH 3/3] delete note that indicates that cgroups v2 are not supported (#5334) Co-authored-by: Daniel Espinosa --- .../README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/README.md b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/README.md index 563aa937652..32e1ce17d2d 100644 --- a/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/README.md +++ b/src/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring/README.md @@ -1,9 +1,6 @@ # Microsoft.Extensions.Diagnostics.ResourceMonitoring -Measures and reports processor and memory usage. This library utilizes control groups (cgroups) in Linux to monitor system resources. - -> [!NOTE] -> Currently, it supports cgroups v1 but does not have support for cgroups v2. +Measures and reports processor and memory usage. This library utilizes control groups (cgroups) including cgroups v2 in Linux to monitor system resources. ## Install the package