MAUI incremental build re-executes Android targets on repeat no-change build due to `OutputMissing`
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
Description
Repeated dotnet build on a .NET MAUI solution (with no source or project changes, and no clean in between) is not behaving like a near no-op.
On the second build, multiple Android-related targets are re-executed because incremental analysis reports OutputMissing for intermediate/stamp outputs.
This suggests an incremental build issue in MAUI Android targets where expected outputs are not preserved or not recognized between consecutive builds.
We work on big, enterprise app which requires about 4 min to build every time we have to start a debug session, even when no changes were made.
This issue seriously impacts our performance
Steps to Reproduce
Steps To Reproduce
-
Build the solution normally:
dotnet build EmptyMaui10App.slnx -v:minimal -
Run the same build again and generate a binlog:
dotnet build EmptyMaui10App.slnx -v:minimal -bl:repeat-build.binlog -
Analyze the second build binlog (
repeat-build.binlog) with incremental analysis.
Expected Behavior
- A second build with no file changes should be mostly up-to-date.
- Compile and Android packaging/stub targets should be skipped unless inputs changed.
Actual Behavior
- Build succeeds, but many targets still execute in the second run.
- Incremental analysis summary for second run:
- Total targets:
1000 - Skipped (UpToDate):
897 - Executed:
103 - Executed reasons:
OutputMissing:102InputNewerThanOutput:1
- Total targets:
Key Re-executed Targets
EmptyMaui10App.csprojCoreCompile(OutputMissing)XamlC(OutputMissing)
EmptyMaui10App.Droid.csproj_GenerateJavaStubs(OutputMissing)_GeneratePackageManagerJava(OutputMissing)_LinkAssembliesNoShrink(InputNewerThanOutput)
Missing/Stale Outputs Reported
obj/Debug/net10.0-android/XamlC.stampobj/Debug/net10.0-android/stamp/_GenerateJavaStubs.stampobj/Debug/net10.0-android/stamp/_GeneratePackageManagerJava.stamp- CoreCompile-related outputs under
obj/binfornet10.0-android
Optional: Repro Notes
I added #warning lines as markers to detect whether compilation ran.
On the repeated run, only the Android marker warning fired, which aligns with Android-specific targets being re-executed.
Link to public reproduction project repository
https://github.com/rafalka/EmptyMaui10App
Version with bug
10.0.70
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
10.0.70
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the EmptyMaui10App.slnx reproduction and run the two dotnet build commands from the issue, then inspect repeat-build.binlog with incremental analysis. Trace the Android targets reporting OutputMissing, especially _GenerateJavaStubs, _GeneratePackageManagerJava, CoreCompile, and XamlC, along with their listed stamp outputs. Done means a repeat no-change build skips those targets and is mostly up to date.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- build-system, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100