Skip to content

[DRAFT] [net11.0] [tools] Add trimmable static registrar.#25105

Draft
rolfbjarne wants to merge 17 commits intonet11.0from
dev/rolf/trimmable-type-map-net11.0
Draft

[DRAFT] [net11.0] [tools] Add trimmable static registrar.#25105
rolfbjarne wants to merge 17 commits intonet11.0from
dev/rolf/trimmable-type-map-net11.0

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

Ignore this PR, it's only to test behavior once merged into net11.0.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 16 commits April 7, 2026 15:49
This makes it easier to navigate a generated project file in VSCode, since the
files are located in folders instead of one potentially enormous list (the
platform assemblies have thousands of source files).
---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
As opposed to hanging the entire test suite (and then getting aborted) if something goes wrong.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Enable nullability and fix any issues.
* Upgrade to NUnit v4.
* Move code from tests/generator to tests/bgen to have everything in the same directory.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ed in multi-RID builds. Fixes #25053. (#25065)

In multi-RID (universal) builds, the outer build saves all Content and BundleResource
items to processed-items files, and inner builds remove them. However, items with
PublishFolderType are not actually processed by CollectBundleResources (it skips
them) — they're handled via ResolvedFileToPublish instead. By incorrectly saving
them as processed, the inner builds remove them before they can be added to ResolvedFileToPublish,
so they never end up in the app bundle.

Fix by filtering out items with PublishFolderType when writing the processed-items
files.

Fixes #25053.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…25106)

This also revealed a couple of other issues:

* Fix an issue stripping dylibs by passing the correct arguments to `strip` (fixes dotnet/runtime#124570).
* Fix an issue running dsymutil on universal apps.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cts.

This makes it possible to debug macOS projects in VSCode (by manually adding a launch profile).

Ref: microsoft/vscode-dotnettools#549
@rolfbjarne rolfbjarne force-pushed the dev/rolf/trimmable-type-map-net11.0 branch from 7a8692a to abec578 Compare April 8, 2026 16:08
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #81f6f24] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 81f6f2482a59f9141a038644495a7ab203942f8a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #81f6f24] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 81f6f2482a59f9141a038644495a7ab203942f8a [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 81f6f2482a59f9141a038644495a7ab203942f8a [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #81f6f24] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 81f6f2482a59f9141a038644495a7ab203942f8a [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🔥 [CI Build #81f6f24] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 13 tests failed, 158 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(iOS,null): Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(iOS,True): Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(MacCatalyst...: Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(MacCatalyst...: Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...

Html Report (VSDrops) Download

❌ dotnettests tests (macOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(MacOSX,null...: Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(MacOSX,True...: Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(TVOS,null): Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...
    • Xamarin.Tests.DotNetProjectTest.LibraryWithResources(TVOS,True): Didn't execute '_DetectSdkLocations'
      Expected: not some item equal to "_DetectSdkLocations"
      But was: < "_LoadRestoreGraph...

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

2 tests failed, 15 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Debug (trimmable static registrar): Crashed
  • monotouch-test/iOS - simulator/Release (trimmable static registrar, all optimizations): Crashed

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

3 tests failed, 19 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Debug (trimmable static registrar): Failed (Test run crashed (exit code: 134).
    No test log file was produced)
  • monotouch-test/Mac Catalyst/Release (trimmable static registrar): Failed (Test run crashed (exit code: 139).
    No test log file was produced)
  • monotouch-test/Mac Catalyst/Release (trimmable static registrar, all optimizations): Failed (Test run crashed (exit code: 139).
    No test log file was produced)

Html Report (VSDrops) Download

❌ monotouch tests (tvOS)

2 tests failed, 15 tests passed.

Failed tests

  • monotouch-test/tvOS - simulator/Debug (trimmable static registrar): Crashed
  • monotouch-test/tvOS - simulator/Release (trimmable static registrar, all optimizations): Crashed

Html Report (VSDrops) Download

❌ windows tests

2 tests failed, 1 tests passed.

Failed tests

  • Remote .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryWithResourcesOnRemoteWindows(iOS,True): Failed: Didn't execute '_DetectSdkLocations'

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryWithResourcesOnWindows(iOS,True): Failed: Didn't execute '_DetectSdkLocations'

  • Local .NET tests/Xamarin.Tests.DotNetProjectTest.LibraryWithResourcesOnWindows(iOS,null): Failed: Didn't execute '_DetectSdkLocations'

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 9 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 15 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 81f6f2482a59f9141a038644495a7ab203942f8a [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants