From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
TrimMode feature switches
From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development
TrimMode feature switches
- [Instructor] We found a few warnings that we cleaned up in relation to trimming, but we left a large one unresolved. How do we deal with the fact that we are using a HybridWebView? That plane does not work with full trimming. With the old Xamarin linker, we would've had to tell it not to link the entire assembly. Luckily, with .NET MAUI full trimming, we have much more control over how trimming works. .NET 9 introduced trimming feature switches. The primary purpose for trimming feature switches is to allow us to turn off individual trimming features and leave the rest of the trim process to work as normal. By default, all trimming options are turned on, but we can turn them off individually. One we find on the list is MauiQueryPropertyAttributeSupport. This would've allowed us to use the query attributes we changed in the last chapter, but that isn't the one we want here. The one we want is at the bottom of the list. The MauiHybridWebViewSupported setting will allow us to use the…