dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.24k stars 1.76k forks source link

MAUI Hybrid Blazor: Significant Build Time Increase in .NET 9 Debug Mode Compared to .NET 8 #25907

Open SaleSwift opened 2 hours ago

SaleSwift commented 2 hours ago

When building a MAUI Hybrid Blazor app in Debug mode locally with .NET 9, the build process takes significantly longer than with .NET 8. Specifically:

.NET 9: ~15 minutes per build. .NET 8: ~3 minutes per build (70% faster). This issue is highly disruptive during development, particularly for local debugging and iterative development cycles.

This issue is critical and must be resolved as it severely impacts development productivity. Me and my entire development team are unable to work effectively with .NET 9 in our development environment due to this issue.

Project Structure:

MAUI Project: This project handles the platform-specific aspects of the application. It takes an excessively long time to build in .NET 9. MAUI Shared Project: Contains shared Razor files and logic. This project builds very quickly, even in .NET 9. The problem specifically lies with the MAUI project, while the Shared project does not exhibit the same slow build times.

Steps to Reproduce: Upgrade a MAUI Hybrid Blazor project from .NET 8 to .NET 9. Run a local Debug build. Compare the build time with the same project in .NET 8.

Expected Behavior: Build times in .NET 9 should be comparable to or faster than .NET 8.

Environment: MAUI Hybrid Blazor application. Local development machine.

Actual Behavior: Build times in .NET 9 are significantly slower, resulting in delays and impacting development productivity.

Additional Context: This issue persists across multiple attempts and affects both new projects and projects upgraded from .NET 8.

Urgency: This bug must be addressed immediately, or guidance must be provided to help us resolve it, as it completely blocks our ability to use .NET 9 in a development environment.

Steps to Reproduce

Upgrade a MAUI Hybrid Blazor project from .NET 8 to .NET 9. Run a local Debug build. Compare the build time with the same project in .NET 8. Expected Behavior: Build times in .NET 9 should be comparable to or faster than .NET 8.

Link to public reproduction project repository

No response

Version with bug

9.0.10 SR1

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.10 SR1

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

similar-issues-ai[bot] commented 2 hours ago

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

jfversluis commented 1 hour ago

Please don't keep opening new issues about the same problem. We'll lose the earlier context. Thanks!

SaleSwift commented 18 minutes ago

Please don't keep opening new issues about the same problem. We'll lose the earlier context. Thanks!

Hi @jfversluis , thanks for your response! I really need help with this issue as it’s completely blocking my team from working with .NET 9 in our MAUI Hybrid Blazor projects. Is there someone who can assist us in resolving this? Appreciate your support!