Description
This is the same issue that has been fixed before here, but with .net10-rc1 it surfaced again.
Describe the bug
When building the app with PublishAot=true, getting a string array from ApplicationData.Current.LocalSettings and casting it to the string[] type I get:
System.InvalidCastException: 'Unable to cast object of type 'WinRT.IInspectable' to type 'System.String[]'.'

Steps To Reproduce
Set in csproj:
<PublishAot>true</PublishAot>
ApplicationData.Current.LocalSettings.Values["test"] = new string[] { "a", "b", "c" };
var array = (string[])ApplicationData.Current.LocalSettings.Values["test"];
Expected Behavior
No crash
NuGet package version
Windows App SDK 1.8.0: 1.8.250916003
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 24H2
IDE
Visual Studio 2026