I saw a demo of maui sherpa on linkedin and figured that this looked like the right time to have a play around.
The docs work fine for a file new maui app, however production apps are often targeting the flat .NET versions (ie net10.0, as well as net10.0-ios;net10.0-android) since that is required for unit testing.
When maui libraries don't target the blank .NET versions you have to introduce al ot of compiler directives depending on how they are used. Obviously this tool will always go behind an #IF DEBUG but I think for quality of life targeting net10.0 would make this a smoother transition to setup in many developers production apps.
I personally define a constant in my app:
<DefineConstants Condition="'$(TargetFramework)' != 'net10.0'">DEVICE;</DefineConstants>
So I can easily add that directive without having to specify exact platforms:
#if DEBUG && DEVICE
builder.AddMauiDevFlowAgent();
#endif
I set this up manually and had a little monday morning "why isn't this working moment", the ai agent skill did not understand why my project didn't work at all (because my project targets .net10.0 and it took some caffeine and looking at the csproj of this project to realise my simple mistake. This is an issue with most maui libraries that don't target blank net versions but since this is incredibly useful I think it would be nice to make it as easy as possible to get setup
I saw a demo of maui sherpa on linkedin and figured that this looked like the right time to have a play around.
The docs work fine for a file new maui app, however production apps are often targeting the flat .NET versions (ie
net10.0, as well asnet10.0-ios;net10.0-android) since that is required for unit testing.When maui libraries don't target the blank .NET versions you have to introduce al ot of compiler directives depending on how they are used. Obviously this tool will always go behind an
#IF DEBUGbut I think for quality of life targetingnet10.0would make this a smoother transition to setup in many developers production apps.I personally define a constant in my app:
So I can easily add that directive without having to specify exact platforms:
I set this up manually and had a little monday morning "why isn't this working moment", the ai agent skill did not understand why my project didn't work at all (because my project targets
.net10.0and it took some caffeine and looking at the csproj of this project to realise my simple mistake. This is an issue with most maui libraries that don't target blank net versions but since this is incredibly useful I think it would be nice to make it as easy as possible to get setup