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
The list of artists for an audio file is stored in the System.Music.Artist property as a list of strings.
We can get this property value using StorageItemContentProperties.RetrievePropertiesAsync.
When casting the returned property object with CsWinRT, the code is throwing an InvalidCastException.
This is working fine in a regular UWP application.
I tried other interfaces IEnumerable<string>, IList<string>, ICollection<string>, IReadOnlyCollection<string>,... but none of them are working 😟
Steps To Reproduce
Add the following code in a .NET9 UWP application:
Description
The list of artists for an audio file is stored in the System.Music.Artist property as a list of strings.
We can get this property value using StorageItemContentProperties.RetrievePropertiesAsync.
When casting the returned property object with CsWinRT, the code is throwing an
InvalidCastException
.This is working fine in a regular UWP application.
I tried other interfaces
IEnumerable<string>
,IList<string>
,ICollection<string>
,IReadOnlyCollection<string>
,... but none of them are working 😟Steps To Reproduce
Add the following code in a .NET9 UWP application:
I've checked all the following types and none of them are matching:
Expected Behavior
The returned list of strings should be castable to a .Net string list object
Version Info
TargetFramework = net9.0-windows10.0.26100.0
Microsoft.Windows.CsWinRT nuget = 2.2.0
Additional Context
Sample application: FileProperties.zip
The text was updated successfully, but these errors were encountered: