[automated] Merge branch 'main' => 'net11.0'#24956
Conversation
This pull request updates the following dependencies ## From https://github.com/dotnet/dotnet - **Subscription**: [30303172-6f12-44a9-887a-ea8520fce068](https://maestro.dot.net/subscriptions?search=30303172-6f12-44a9-887a-ea8520fce068) - **Build**: [20260317.11](https://dev.azure.com/dnceng/internal/_build/results?buildId=2928892) ([306642](https://maestro.dot.net/channel/9626/github:dotnet:dotnet/build/306642)) - **Date Produced**: March 17, 2026 9:45:30 PM UTC - **Commit**: [853c0311d71c9991dbf3ec6e7324c0ff349700da](dotnet/dotnet@853c031) - **Branch**: [release/10.0.3xx](https://github.com/dotnet/dotnet/tree/release/10.0.3xx) - **Dependency Updates**: - From [10.0.0-beta.26166.109 to 10.0.0-beta.26167.111][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.SharedFramework.Sdk - From [10.0.300-preview.0.26166.109 to 10.0.300-preview.0.26167.111][1] - Microsoft.NET.Sdk - From [10.0.300-preview.26166.109 to 10.0.300-preview.26167.111][1] - Microsoft.TemplateEngine.Authoring.Tasks [1]: dotnet/dotnet@e116d98...853c031
* Use web sockets to connect the endpoints when doing hot reload / dotnet watch. * Change the defaults when launching desktop apps and we're in 'dotnet watch' mode: * Always open app in a new instance. * Wait for exit enabled. * Pipe stdout/stderr to the current terminal. * Validate that the project wasn't built with a build configuration that would prevent Hot Reload from working. Contributes towards #24782.
…20260317174730541 to main (#24912) LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260317174730541 to main with localized lcls
…ized buffer (#24920) CreateAdaptive_3 and CreateAdaptive_4 used a hardcoded 512-byte buffer for a 256x256 adaptive bitmap context. When ToImage() called CGBitmapContextCreateImage, CoreGraphics tried to copy the bitmap data from this tiny buffer, reading past the allocation and causing a SIGSEGV. Fix CreateAdaptive_3 by computing the buffer size from parameters.AlignedBytesPerRow * parameters.Height (matching CreateAdaptive_2). Fix CreateAdaptive_4 by using a 1MB buffer, large enough for any 256x256 adaptive bitmap format. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Improve nullability annotations for FromArrayOfArray (accept NSArray?, return NSObject[][]?). * Rewrite FromArrayOfArray to use ArrayFromHandleDropNullElements. * Improve nullability annotations for From(NSObject[][]) (accept NSObject[][]?, return NSArray?). * Rewrite From(NSObject[][]) to use FromNSObjects. * Update XML docs for all modified members. * Add tests for NSArray.FromArrayOfArray, NSArray.From(NSObject[][]) and NSEntityDescription.UniquenessConstraints. Contributes towards #17285. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This pull request updates the following dependencies ## From https://github.com/dotnet/xharness - **Subscription**: [02e03784-16b3-4ced-b02a-3715797fc7da](https://maestro.dot.net/subscriptions?search=02e03784-16b3-4ced-b02a-3715797fc7da) - **Build**: [20260317.2](https://dev.azure.com/dnceng/internal/_build/results?buildId=2928635) ([306520](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/306520)) - **Date Produced**: March 17, 2026 1:33:45 PM UTC - **Commit**: [f3b160fbbe5a43f6fc03b27629e689ef00de3ef9](dotnet/xharness@f3b160f) - **Branch**: [main](https://github.com/dotnet/xharness/tree/main) - **Dependency Updates**: - From [11.0.0-prerelease.26166.1 to 11.0.0-prerelease.26167.2][1] - Microsoft.DotNet.XHarness.iOS.Shared [1]: dotnet/xharness@581c6a9...f3b160f
[main] Update dependencies from dotnet/dotnet (#24930) This pull request updates the following dependencies ## From https://github.com/dotnet/dotnet - **Subscription**: [30303172-6f12-44a9-887a-ea8520fce068](https://maestro.dot.net/subscriptions?search=30303172-6f12-44a9-887a-ea8520fce068) - **Build**: [20260317.15](https://dev.azure.com/dnceng/internal/_build/results?buildId=2929122) ([306693](https://maestro.dot.net/channel/9626/github:dotnet:dotnet/build/306693)) - **Date Produced**: March 18, 2026 3:24:01 AM UTC - **Commit**: [4a2e646b931b90322897a5166f0bbcd3f5508a03](dotnet/dotnet@4a2e646) - **Branch**: [release/10.0.3xx](https://github.com/dotnet/dotnet/tree/release/10.0.3xx) - **Dependency Updates**: - From [10.0.0-beta.26167.111 to 10.0.0-beta.26167.115][1] - Microsoft.DotNet.Arcade.Sdk - Microsoft.DotNet.Build.Tasks.Feed - Microsoft.DotNet.SharedFramework.Sdk - From [10.0.300-preview.0.26167.111 to 10.0.300-preview.0.26167.115][1] - Microsoft.NET.Sdk - From [10.0.300-preview.26167.111 to 10.0.300-preview.26167.115][1] - Microsoft.TemplateEngine.Authoring.Tasks [1]: dotnet/dotnet@853c031...4a2e646
…20260318174924112 to main (#24925) LEGO: Pull request from lego/hb_5df43909-4a19-4f55-bc3f-9ea8fccf3c82_20260318174924112 to main with localized lcls
Brings fixes for building from Windows targeting a .NET version lower than the used to build (i.e., building with .NET 11 a project targeting net10.0-ios). --------- Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
…s.dll). (#24932) We want to build our task assembly for .NET 10, but there's a breaking change when loading .NET assemblies in MSBuild: they're isolated from eachother. However, we need all our tasks to be able to talk to eachother when building remotely (because the remote connection is stored in static state) - so the solution is to put all the tasks in the same assembly. The quickest and easiest way to do this is to just create an empty subclass of the actual task class in the assembly where we have all the other tasks, so this pull request does that. To simplify iterating on the MSBuild logic, I've also included the `Xamarin.Messaging.targets` file.
This pull request updates the following dependencies ## From https://github.com/dotnet/xharness - **Subscription**: [02e03784-16b3-4ced-b02a-3715797fc7da](https://maestro.dot.net/subscriptions?search=02e03784-16b3-4ced-b02a-3715797fc7da) - **Build**: [20260318.1](https://dev.azure.com/dnceng/internal/_build/results?buildId=2929517) ([306735](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/306735)) - **Date Produced**: March 18, 2026 9:51:17 AM UTC - **Commit**: [607b3de9cf2dbfec6734e686e68d2813b40b2b51](dotnet/xharness@607b3de) - **Branch**: [main](https://github.com/dotnet/xharness/tree/main) - **Dependency Updates**: - From [11.0.0-prerelease.26167.2 to 11.0.0-prerelease.26168.1][1] - Microsoft.DotNet.XHarness.iOS.Shared [1]: dotnet/xharness@f3b160f...607b3de
This pull request updates the following dependencies ## From https://github.com/dotnet/xharness - **Subscription**: [02e03784-16b3-4ced-b02a-3715797fc7da](https://maestro.dot.net/subscriptions?search=02e03784-16b3-4ced-b02a-3715797fc7da) - **Build**: [20260319.1](https://dev.azure.com/dnceng/internal/_build/results?buildId=2930521) ([306917](https://maestro.dot.net/channel/2/github:dotnet:xharness/build/306917)) - **Date Produced**: March 19, 2026 11:31:01 AM UTC - **Commit**: [b0c8bf6dba87c70e284cff06819f0cd714c8f2e4](dotnet/xharness@b0c8bf6) - **Branch**: [main](https://github.com/dotnet/xharness/tree/main) - **Dependency Updates**: - From [11.0.0-prerelease.26168.1 to 11.0.0-prerelease.26169.1][1] - Microsoft.DotNet.XHarness.iOS.Shared [1]: dotnet/xharness@607b3de...b0c8bf6
…uto-decompressed responses in NSUrlSessionHandler. Fixes #23958. (#24924) NSURLSession automatically decompresses content for supported encodings (gzip, deflate, br, zstd, etc.) but leaves the original Content-Encoding and Content-Length headers in the response. This causes a mismatch where Content-Length refers to the compressed size while the body is decompressed. All other HTTP handlers (SocketsHttpHandler, WinHttpHandler, Android's handler) remove these headers after automatic decompression. This change makes NSUrlSessionHandler consistent with them. Fixes #23958 --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Phones. (#24921) This fixes an issue where passing `--device=<ipad-udid>` wouldn't work, because the UDID wouldn't be found in the list of applicable devices, because iPads weren't listed as applicable devices.
Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Version.Details.props - eng/common/*
This way we get validation of any xml docs in dotnet-linker. Also make all warnings errors, since we're now warning-free.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
… GCHandles. Fixes #24702. (#24841) ## Summary Fix a race condition in `xamarin_switch_gchandle` where one thread switching a GCHandle between weak and strong could free a handle that another thread was simultaneously reading. This caused intermittent crashes and "Could not find an existing managed instance" errors at runtime. Fixes #24702. ## Problem `xamarin_switch_gchandle` is called from retain/release to toggle an object's GCHandle between weak (so the GC can collect the managed peer) and strong (so the managed peer stays alive while Objective-C holds a reference). The old implementation performed a non-atomic free-then-replace on the object's `gc_handle` field: 1. Read the old GCHandle and its flags. 2. Allocate a new GCHandle (weak or strong). 3. Free the old GCHandle. 4. Store the new GCHandle on the object. Between steps 3 and 4, a concurrent thread invoking an exported Objective-C method would read the `gc_handle` field, obtain the already-freed handle, and either crash or fail to resolve the managed object — producing errors like: > Failed to marshal the Objective-C object 0x… Could not find an existing > managed instance for this object, nor was it possible to create a new > managed instance. ## Solution: dual-GCHandle scheme Instead of replacing the object's GCHandle in place, the fix introduces a **dual-GCHandle** design: - **The object's `gc_handle` is always a weak handle** and is never modified by `xamarin_switch_gchandle`. Concurrent readers always see a valid handle. - **A separate strong GCHandle** is stored in a global mutex-protected `CFMutableDictionary` (`strong_gchandle_hash`), keyed by the native object pointer. - **Switching to strong**: allocate a strong GCHandle for the managed object and insert it into the hash table. The weak handle remains on the object unchanged. - **Switching to weak**: remove and free the strong GCHandle from the hash table. The weak handle remains on the object unchanged. Because the `gc_handle` field is never written by `xamarin_switch_gchandle`, the race is eliminated: concurrent readers always see a valid weak GCHandle that can resolve the managed object (the strong GCHandle in the hash table keeps it alive and prevents collection). ## Changes ### `runtime/runtime.m` - Add `strong_gchandle_hash` (`CFMutableDictionaryRef`) and its `pthread_mutex_t` lock. - Add `free_strong_gchandle()` — removes and frees the strong handle for a native object from the hash table. - Add `create_strong_gchandle()` — creates a strong handle and inserts it into the hash table (no-op if one already exists, preventing duplicates from concurrent callers). - Rewrite `xamarin_switch_gchandle()` to use the dual-GCHandle scheme instead of free-then-replace. - Update `xamarin_free_gchandle()` to also clear any strong GCHandle from the hash table (`xamarin_free_gchandle()` is called when a native object is about to be freed). - Clean up `strong_gchandle_hash` during runtime shutdown. - Remove `get_gchandle_safe()` (no longer needed; replaced by `get_gchandle_without_flags()`). ### `runtime/xamarin/trampolines.h` - Remove `XamarinGCHandleFlags_WeakGCHandle = 1` (the flag is no longer needed since `gc_handle` is always weak). ### `src/Foundation/NSObject2.cs` - Remove `WeakGCHandle` from the managed `XamarinGCHandleFlags` enum. - Stop setting `WeakGCHandle` in `CreateManagedRef()`. ### `tests/monotouch-test/ObjCRuntime/GCHandleSwitchRaceTest.cs` (new) - Regression test that reproduces the race: one thread rapidly retains/releases an object (toggling the GCHandle) while another thread simultaneously invokes an exported Objective-C method (reading the GCHandle). Without the fix this crashes; with the fix it completes cleanly. ### `tests/dotnet/UnitTests/expected/iOS-MonoVM-*.txt` - Remove `WeakGCHandle` from preserved API expectations. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…24923) When macOS tests fail, the actual error details (stderr/stdout) were redirected to files and never shown in the CI console or TestSummary. This made failures like 'dotnet not on PATH' impossible to diagnose without downloading artifacts. Changes: - Add pre-flight check for dotnet availability with clear error message - Log last 50 lines of stderr/stdout to CI console when a test fails - Include exit code in TestSummary for each failed test - Show stderr tail in TestSummary when no [FAIL] lines are available --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…evOps (#24926) Replace the GitHub Actions workflow (.github/workflows/linux-build.yml) with a new Azure DevOps stage that runs in parallel with the existing pipeline stages. The new stage checks out the code on a Linux agent, verifies system dependencies, and runs 'make' to confirm the build succeeds. The stage is added to both the official build pipeline (main-stage.yml) and the test pipeline (tests-stage.yml), using the appropriate Linux pool for each (1ES pool for official, ubuntu-latest for tests). This solves a problem with the GitHub action where it wouldn't run if the last commit was from another GitHub action (which is a good thing). This is problematic for us though, because this happens fairly often (autoformat, global.json generation), and it means such pull requests require admin rigths to merge, because the linux validation is a required check. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Ship the net10.0 version of our msbuild tasks. * This required a bit of a reshuffling of the files in our Sdk pack, since we now ship both a netstandard2.0 and a net10.0 version of our msbuild tasks. * Use the net10.0 version of the msbuild tasks by default, but allow opt-out using the property '_UseDesktopTaskAssemblies'. Loading the net10.0 version of the tasks should work in VS2026, because VS2026 supports the "Runtime=NET" metadata on the 'UsingTask' directive (VS2022 does not, but this doesn't matter, because we don't support VS2022 anymore in .NET 10+). Hopefully we'll be able to remove the opt-out once we've confirmed nothing breaks, and then we can remove the netstandard2.0 versions of our task assemblies.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
They don't work in .NET 11 yet.
✅ [CI Build #0b69a8c] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #0b69a8c] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #0b69a8c] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #0b69a8c] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 161 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
I detected changes in the main branch which have not been merged yet to net11.0. I'm a robot and am configured to help you automatically keep net11.0 up to date, so I've opened this PR.
This PR merges commits made on main by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/main-to-net11.0'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.
or if you are using SSH
Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.