Skip to content

Fix: MonoRuntimeMixedModeExcludedAssembly ignored when WasmShellAOTProfileExcludedMethods unset (backport #1027)#1028

Merged
jeromelaban merged 11 commits intorelease/stable/10.0from
mergify/bp/release/stable/10.0/pr-1027
Jan 29, 2026
Merged

Fix: MonoRuntimeMixedModeExcludedAssembly ignored when WasmShellAOTProfileExcludedMethods unset (backport #1027)#1028
jeromelaban merged 11 commits intorelease/stable/10.0from
mergify/bp/release/stable/10.0/pr-1027

Conversation

@mergify
Copy link

@mergify mergify bot commented Jan 29, 2026

  • Understand the issue - MonoRuntimeMixedModeExcludedAssembly not working when used alone
  • Identify root cause - incorrect parameter type in targets file (property vs item group)
  • Fix the targets file to pass @(MonoRuntimeMixedModeExcludedAssembly) instead of $(WasmShellMixedModeExcludedAssembly)
  • Create a test project that validates the fix using WasmShellGenerateAOTProfileDebugList
  • Document the test with a README
  • Run code review - passed with no comments
  • Security checks - no security concerns (minimal change to MSBuild parameter passing)
  • Add test to CI configuration with explicit publish steps
  • Enhance validation to analyze profile content and verify assembly filtering works correctly
  • Fix solution file configuration (add test to main .sln file)
  • Fix validation target timing and remove from solution filter to avoid memory issues
  • Fix test to actually use Newtonsoft.Json so methods are in the profile
Original prompt

This section details on the original issue you should resolve

<issue_title>[AOT] MonoRuntimeMixedModeExcludedAssembly is not taken into account if WasmShellAOTProfileExcludedMethods is not specified</issue_title>
<issue_description>### Current behavior 🐛

MonoRuntimeMixedModeExcludedAssembly should be useable independently to filter the AOT profile.

Expected behavior 🎯

Profile filtering is properly enabled.

How to reproduce it (as minimally and precisely as possible) 🔬

No response

Workaround 🛠️

No response

Renderer 🎨

  • Skia
  • Native

Affected platforms 📱💻🖥️

No response

Uno.Sdk version (and other relevant versions) 📦

10.0.15

IDE version 🧑‍💻

No response

Anything else we need to know? 💬

No response</issue_description>

<agent_instructions>Make sure to add a new test that will validate this behavior using the WasmShellGenerateAOTProfileDebugList file generation, as a post build step.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.


This is an automatic backport of pull request #1027 done by [Mergify](https://mergify.com).

Copilot AI and others added 11 commits January 29, 2026 13:30
The issue was that MixedModeExcludedAssembly parameter was being passed
as a property (string) instead of an item group (array). This prevented
MonoRuntimeMixedModeExcludedAssembly from working independently.

Also added a test project to validate the fix using WasmShellGenerateAOTProfileDebugList.

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 27a85f7)
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 513d477)
Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 32926cc)
Added Uno.Wasm.Tests.MixedModeProfile to the netcore-only solution filter
to ensure it's built and validated as part of continuous integration.

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 05a73a5)
Added dedicated build steps to both Linux and Windows CI pipelines that
explicitly run 'dotnet publish' on the MixedModeProfile test project.
This ensures the AOT process runs and the post-build validation target
can verify that profile filtering works correctly.

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 2d292c6)
- Enhanced post-build validation to actually analyze profile content
- Verifies Newtonsoft.Json methods exist in original profile
- Verifies Newtonsoft.Json and System.Xml methods are excluded from filtered profile
- Removed accidentally added nuget.exe binary
- Updated README with detailed validation information

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 363111b)
The test project was added to the solution filter but not to the main
.sln file, causing MSB5028 build error. Added the project entry with
proper configuration mappings and nested it under the Tests folder.

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 70776c0)
- Removed MixedModeProfile from netcore-only.slnf to avoid memory issues
- Changed validation target to run AfterTargets="Publish" instead of "Build"
- Added condition to only run validation when WasmAotProfilePath is set
- AOT profile processing happens during Publish, not Build phase

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit ddecc5f)
…tion

- Updated Program.cs to actually use Newtonsoft.Json (SerializeObject/DeserializeObject)
- Changed from WasmShellEnableAotProfile to WasmAotProfilePath property
- This ensures Newtonsoft.Json methods are in the AOT profile so validation can verify they're filtered out

Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
(cherry picked from commit 2160d63)
(cherry picked from commit 13d995c)
(cherry picked from commit 70ece07)
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ jeromelaban
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@jeromelaban jeromelaban merged commit 90d991a into release/stable/10.0 Jan 29, 2026
8 of 9 checks passed
@jeromelaban jeromelaban deleted the mergify/bp/release/stable/10.0/pr-1027 branch January 29, 2026 16:17
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.

3 participants