Fix crash in .NET 9
- Converts project to a newer class library. Explicit TFM is no longer necessary
- Update obsoluted references with equivalents
Fixes #116
In the referenced issue, you stated:
This is likely due to the use of reflection based bindings in Sharpnado. This is no longer allowed in .NET 9 and all bindings must be compiled (or explicitly opted out with x:DataType={x:Null}.
But I don't see any change to compiled bindings in this PR. Moreover this PR is changing target type and swap Frame for Border, so it doesn't relate to its name (fix crash in .net9)
@roubachof my apologies. I have been fixing issues in various libraries during my migration to .NET 9. As you say, the issue in Sharpnado was not reflection bindings, but actually just references to obsoleted code (Device and Frame), which result in a runtime crash.
You will notice b530513 also always utilizes a gesture instead of the effects that were previously in-place. There was an issue in my testing where the gestures would no longer trigger in .NET 8, but I can't find the related change in MAUI. Using gestures on both iOS and Android was the solution.
This may break incompatibility with .NET older than 6, but I'm not sure that's quite necessary to support and I recommend following the MAUI support lifecycle (non-LTS is supported for year of release, LTS is supported 2-3 years). In which the current supported versions of MAUI are .NET 8 and .NET 9.
I have confirmed this does not break .NET 8 on Android or iOS.
@roubachof my apologies. I have been fixing issues in various libraries during my migration to .NET 9. As you say, the issue in Sharpnado was not reflection bindings, but actually just references to obsoleted code (
DeviceandFrame), which result in a runtime crash.You will notice b530513 also always utilizes a gesture instead of the effects that were previously in-place. There was an issue in my testing where the gestures would no longer trigger in .NET 8, but I can't find the related change in MAUI. Using gestures on both iOS and Android was the solution.
This may break incompatibility with .NET older than 6, but I'm not sure that's quite necessary to support and I recommend following the MAUI support lifecycle (non-LTS is supported for year of release, LTS is supported 2-3 years). In which the current supported versions of MAUI are .NET 8 and .NET 9.
I have confirmed this does not break .NET 8 on Android or iOS.
MAUI does not follow standard .NET policy, STS & LTS are following the same rule : A major version receives support for a minimum of 6 months after a successor (the next major release) ships: https://dotnet.microsoft.com/en-us/platform/support/policy/maui
This may break incompatibility with .NET older than 6, but I'm not sure that's quite necessary to support and I recommend following the MAUI support lifecycle (non-LTS is supported for year of release, LTS is supported 2-3 years). In which the current supported versions of MAUI are .NET 8 and .NET 9. I have confirmed this does not break .NET 8 on Android or iOS.
MAUI does not follow standard .NET policy, STS & LTS are following the same rule : A major version receives support for a minimum of 6 months after a successor (the next major release) ships: https://dotnet.microsoft.com/en-us/platform/support/policy/maui
Right. MAUI 6 and 7 are of out support by now, so they do not need to be supported any more by this library.
However, as written above, we'll need to keep .NET 8 support for now, so the net9.0 target frameworks will need to be added to the net8.0 ones instead of replacing them.
- Converts project to a newer class library. Explicit TFM is no longer necessary
@daltzctr Where did you get this actually? I did not see it in the .NET 9 release notes.
You will notice b530513 also always utilizes a gesture instead of the effects that were previously in-place. There was an issue in my testing where the gestures would no longer trigger in .NET 8, but I can't find the related change in MAUI. Using gestures on both iOS and Android was the solution.
This is very similar my proposed change from #126 (which was actually rejected by @roubachof). What issues did you see exactly? Do they occur also on iOS, or only on Android?