-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
After adding the NotFoundPage to my Router object, I can no longer build without errors:
.../Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator/Components_Routes_razor.g.cs(81,13): error IL2111: Method 'Microsoft.AspNetCore.Components.Routing.Router.NotFoundPage.set' with parameters or return value with
DynamicallyAccessedMembersAttribute
is accessed via reflection. Trimmer can't guarantee availability of the requirements of the method.
I am not sure what I am supposed to do. Is this a terrible issue and I can no longer use full linker, or is this a false positive and we can ignore? What is the best way to ignore without disabling this check?
Expected Behavior
No errors.
Steps To Reproduce
This requires the usage of the new templates, but is also really a small chnage to use this new property. But...
dotnet new maui-blazor -f net10.0
dotnet build -c Release -f:net10.0-ios -p:TreatWarningsAsErrors=true -p:TrimmerSingleWarn=false -p:TrimMode=full
Exceptions (if any)
No response
.NET Version
.NET 10 RC 1
Anything else?
No response