You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using PageResolver v1 for a while now and want to implement PageResolver v2.5.3 using the .NET 8+ code generator feature in a new project. I discovered that <ImplicitUsings>enable</ImplicitUsings> must be set on the MAUI project in order for PageResolver v2 to work at all (at least at "default" settings).
If ImplicitUsings are not enabled the project will not build as soon as PageResolver nuget package has been added. I am using MAUI .NET 9 targetind Android and iOS. The build error reads as The type or namespace 'MauiAppBuilder' could not be found in PageResolverExtensions.
I wonder if this is a limitation or a bug? It is not documented as far as I can tell.
Best regards
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @andyzukunft. I can explicitly add that namespace import to the generated files. As a workaround in the meantime if you don't want to enable implicit usings, you could add a global using statement for Microsoft.Maui.Hosting somewhere in your project.
If it is simple to implement I would suggest to add the namespace to the code generator. As an interim solution documenting this behaviour should be fine.
I did enable implicit usings and I think I will keep it that way. It seems I was the only one not enabling it anyway ;-).
Hey all,
I am using PageResolver v1 for a while now and want to implement PageResolver v2.5.3 using the .NET 8+ code generator feature in a new project. I discovered that
<ImplicitUsings>enable</ImplicitUsings>
must be set on the MAUI project in order for PageResolver v2 to work at all (at least at "default" settings).If
ImplicitUsings
are not enabled the project will not build as soon as PageResolver nuget package has been added. I am using MAUI .NET 9 targetind Android and iOS. The build error reads asThe type or namespace 'MauiAppBuilder' could not be found
inPageResolverExtensions
.I wonder if this is a limitation or a bug? It is not documented as far as I can tell.
Best regards
The text was updated successfully, but these errors were encountered: