-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAUI Hybrid Blazor: Significant Build Time Increase in .NET 9 Debug Mode Compared to .NET 8 #44932
Comments
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.
|
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! |
In the previous issue I asked for a binlog with instructions on how to get it. Unfortunately, those were not provided and so its impossible to understand what exactly is the cause of this. If this is really blocking you right now, I would recommend going back to .NET 8 for now for your main work and then provide the requested details so we can investigate and advise and then you can try those out before you upgrade definitively. |
Thank you for your response and guidance. Building via Command Line dotnet build myproject.csproj /bl:msbuild.binlog Building via Visual Studio Duration: The build took approximately 22 minutes to complete. https://drive.google.com/file/d/1L0-dgMaw9pu4hsIZt0YzV3qsETDi5ISM/view?usp=drive_link (Visual studio build Log) Note: |
I feel like this is possibly related to this one I just opened, or at least I am experiencing both together. I just had a MAUI build time of 36 minutes for a project with an RCL. dotnet/aspnetcore#59014 |
Drive links access are currently set to public Is there any updated releated to this issue ? |
I hope the maui or visual studio team have workaround to fix this issue until they do an update |
@SaleSwift we've started looking at this. The slowdown seems to be caused by some of the new features we added in .NET 9.0. Your app seems to contain a large number of assets (16K assets) and that is adding a lot of processing time. Most of the assets you are bringing are icons, which are unlikely to be used by the app. We are working to improve the experience in the SDK for apps with a large amount of assets, however, there are a few things that you can do today to avoid these problems:
We have some performance improvements coming down in a future release to better handle these scenarios even if the assets are not being used, but that doesn't mean you shouldn't trim the set of assets in your app to those you use, as otherwise it'll bloat your app size and slow down the build |
Thank you so much for your help . After removing the unused assets, the build time was reduced to around 2.5 minutes, which is a 90% improvement! It was still a bit strange to me that .NET 8 was faster, but your advice about removing unused assets really made a huge difference. Since you mentioned there are some performance improvements coming in a future release, would you recommend keeping the issue open until those updates are available, or should I go ahead and close it for now? Let me know what would be best. Thanks again for your support! |
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
The text was updated successfully, but these errors were encountered: