Skip to content

MediaPlayer fails on Windows-arm64 #23152

Closed

Description

@jonpryor

Current behavior

MediaPlayer does not work on Windows-arm64.

Consider this Debug build and run:

git clone https://github.com/unoplatform/uno.chefs.git
cd uno.chefs
git checkout d54bceea13406bca23e870a89ecee469813c69b3
dotnet build -f net9.0-desktop Chefs\Chefs.csproj
.\Chefs\bin\Debug\net9.0-desktop\Chefs.exe

dotnet is 10.0.202.

After launching the app:

  1. Click Skip
  2. Click  Sign in with Apple
  3. Click Avocado Toast (or any other recipe)
  4. Click 🥕 Start Cooking!

No video is shown.

Image

Console output contains:

fail: Uno.UI.Dispatching.NativeDispatcher[0]
      NativeDispatcher unhandled exception
      System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
       ---> LibVLCSharp.Shared.VLCException: Failed to load required native libraries.
      Have you installed the latest LibVLC package from nuget for your target platform?
      Search paths include Z:\Developer\src\unoplatform\Uno.Chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x64\libvlc.dll,Z:\Developer\src\unoplatform\Uno.Chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x64\libvlccore.dll; Z:\Developer\src\unoplatform\Uno.Chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x64\libvlc.dll,Z:\Developer\src\unoplatform\Uno.Chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x64\libvlccore.dll; Z:\Developer\src\unoplatform\Uno.Chefs\Chefs\bin\Debug\net9.0-desktop\libvlc.dll,
         at LibVLCSharp.Shared.Core.LoadLibVLC(String libvlcDirectoryPath)
         at LibVLCSharp.Shared.Core.InitializeDesktop(String libvlcDirectoryPath)
         at LibVLCSharp.Shared.Helpers.MarshalUtils.CreateWithOptions(String[] options, Func`3 create)
         at LibVLCSharp.Shared.LibVLC.<>c__DisplayClass8_0.<.ctor>b__0()
         at LibVLCSharp.Shared.Internal..ctor(Func`1 create, Action`1 release)
         at LibVLCSharp.Shared.LibVLC..ctor(String[] options)
         at Uno.UI.MediaPlayer.Skia.Win32.SharedMediaPlayerExtension..ctor(MediaPlayer player)
         at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
         at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
         --- End of inner exception stack trace ---
         at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
         at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
         at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
         at Uno.UI.Runtime.Skia.Win32.Win32Host.<>c__DisplayClass5_0.<.cctor>b__18(MediaPlayer player)
         at Uno.Foundation.Extensibility.ApiExtensibility.<>c__DisplayClass3_0`1.<Register>b__0(Object o) in C:\a\1\s\src\Uno.Foundation\Extensibility\ApiExtensibility.cs:line 52
         at Uno.Foundation.Extensibility.ApiExtensibility.CreateInstance[T](Object owner, T& instance) in C:\a\1\s\src\Uno.Foundation\Extensibility\ApiExtensibility.cs:line 85
         at Windows.Media.Playback.MediaPlayer.Initialize() in C:\a\1\s\src\Uno.UWP\Media\Playback\MediaPlayer.others.cs:line 27
         at Windows.Media.Playback.MediaPlayer..ctor() in C:\a\1\s\src\Uno.UWP\Media\Playback\MediaPlayer.cs:line 94
         at Microsoft.UI.Xaml.Controls.MediaPlayerElement.OnApplyTemplate() in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\MediaPlayerElement\MediaPlayerElement.cs:line 393
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 292
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Uno.Toolkit.UI.AutoLayout.MeasureOverride(Size availableSize)
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Uno.Toolkit.UI.AutoLayout.MeasureOverride(Size availableSize)
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Uno.Toolkit.UI.AutoLayout.MeasureOverride(Size availableSize)
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.Controls.Control.MeasureOverride(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 484
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.Controls.ContentPresenter.MeasureOverride(Size size) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\ContentPresenter\ContentPresenter.cs:line 1259
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.Controls.Control.MeasureOverride(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\Controls\Control\Control.cs:line 484
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Microsoft.UI.Xaml.UIElement.Measure(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.Layout.crossruntime.cs:line 170
         at Uno.UI.Xaml.Islands.XamlIslandRoot.MeasureOverride(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\Internal\Islands\XamlIslandRoot.Core.cs:line 54
         at Microsoft.UI.Xaml.FrameworkElement.InnerMeasureCore(Size availableSize) in C:\a\1\s\src\Uno.UI\UI\Xaml\FrameworkElement.Layout.crossruntime.cs:line 333
         at Microsoft.UI.Xaml.UIElement.UpdateLayout() in C:\a\1\s\src\Uno.UI\UI\Xaml\UIElement.cs:line 793
         at Uno.UI.Xaml.Core.CoreServices.OnTick() in C:\a\1\s\src\Uno.UI\UI\Xaml\Internal\CoreServices.cs:line 103
         at Uno.UI.Dispatching.NativeDispatcher.RunAction(NativeDispatcher dispatcher, Action action) in C:\a\1\s\src\Uno.UI.Dispatching\Native\NativeDispatcher.cs:line 141

Expected behavior

On the left-hand side of the app, a video should play.

Compare to macOS:

dotnet build -f net9.0-desktop Chefs/Chefs.csproj
./Chefs/bin/Debug/net9.0-desktop/Chefs
Image

Note: requires that .NET 9.0 be installed, even when building with .NET 10, in order to avoid:

% ./Chefs/bin/Debug/net9.0-desktop/Chefs 
You must install or update .NET to run this application.

App: /Users/jon/Developer/src/unoplatform/Uno.Chefs/Chefs/bin/Debug/net9.0-desktop/Chefs
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '9.0.0' (arm64)
.NET location: /usr/local/share/dotnet

The following frameworks were found:
  10.0.5 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

Learn more:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=9.0.0&arch=arm64&rid=osx-arm64&os=osx.26

How to reproduce it (as minimally and precisely as possible)

Environment

  • Visual Studio 2022 (version: )
  • Visual Studio 2022 for Mac (version: )
  • Visual Studio Code (version: )
  • Rider Windows
  • Rider macOS
  • Rider Linux

Nuget Package(s)

Uno Version(s)

  • Uno.Sdk Version: 6.4.53 (what's currently used in main), and this also happens with 6.6.0-dev.222.

Affected platform(s)

  • iOS
  • Android
  • WebAssembly
  • WebAssembly renders for Xamarin.Forms
  • Windows
  • Desktop
  • Build tasks

Relevant plugins

  • Resharper (version: )

Anything else we need to know?

Activity

  1. added
    kind/bug
    triage/untriaged
    on Apr 28, 2026
  2. changed the title [-]Video playback fails on Windows[/-] [+]Video playback fails on Windows-arm64[/+] on Apr 28, 2026
  3. jonpryor commented on Apr 28, 2026

    @jonpryor
    ContributorAuthor

    This appears to be a "win-arm64" issue. Which in turn means it's a "bump all the things" issue.

    For starters, when building with the "default" Uno.Sdk 6.4.53 (because that's what main currently uses), the VideoLan.LibVLC.Windows 3.0.21 NuGet Package is used, which doesn't even contain arm64 support. (It's from 2024-Sep-16.

    Updating global.json to instead target 6.6.0-dev.222 in turn bumps the VideoLan.LibVLC.Windows version to 3.0.23.1, which does have arm64 binaries:

    > dotnet build -f net9.0-desktop Chefs\Chefs.csproj
    > gci -r -fi libvlc.dll | select FullName
    
    FullName
    --------
    Z:\Developer\src\unoplatform\uno.chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x86\libvlc.dll
    Z:\Developer\src\unoplatform\uno.chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-x64\libvlc.dll
    Z:\Developer\src\unoplatform\uno.chefs\Chefs\bin\Debug\net9.0-desktop\libvlc\win-arm64\libvlc.dll
    

    (Behold! libvlc\win-arm64\libvlc.dll!)

    Unfortunately, getting an arm64 version of libvlc.dll into the output directory is only half the problem.

    The other half of the problem is loading the correct libvlc.dll. That in turn requires this change to LibVLCSharp: videolan/libvlcsharp@e1b93f8

    The above fix is part of LibVLCSharp 3.9.7 and later.

    Unfortunately Uno.UI.MediaPlayer.Skia.Win32 explicitly references LibVLCSharp 3.7.0 -- from 2023-04-04 -- which predates the fix in videolan/libvlcsharp@e1b93f8a by 3 years.

    "Obviously," to support MediaPlayer on win-arm64, we need to update Uno to reference a newer version of LibVLCSharp.

    I attempted to "force" use of a newer version in Chefs:

    diff --git a/Chefs/Chefs.csproj b/Chefs/Chefs.csproj
    index 44f094ce..684cb1bf 100644
    --- a/Chefs/Chefs.csproj
    +++ b/Chefs/Chefs.csproj
    @@ -68,6 +68,9 @@
     
     	<ItemGroup>
     		<PackageReference Include="Mapsui.Uno.WinUI" />
    +		<PackageReference Include="LibVLCSharp" />
    +	    <PackageReference Include="Microsoft.WindowsAppSDK" />
    +
     		<PackageReference Include="LiveChartsCore.SkiaSharpView.Uno.WinUI" />
     	</ItemGroup>
     
    diff --git a/Directory.Packages.props b/Directory.Packages.props
    index d6babba6..225e30d7 100644
    --- a/Directory.Packages.props
    +++ b/Directory.Packages.props
    @@ -7,6 +7,7 @@
         <PackageVersion Include="LiveChartsCore.SkiaSharpView.Uno.WinUI" Version="2.0.0-rc4.5" />
         <PackageVersion Include="Mapsui.Uno.WinUI" Version="5.0.0" />
         <PackageVersion Include="LiveChartsCore.SkiaSharpView.WinUI" Version="2.0.0-rc4.5" />
    +    <PackageVersion Include="LibVLCSharp" Version="3.9.7.1" />
         <PackageVersion Include="Mapsui.WinUI" Version="5.0.0-beta.23" />
         <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
         <PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
    @@ -17,5 +18,6 @@
         <PackageVersion Include="System.Private.Uri" Version="4.3.2" />
         <PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="9.0.2" />
         <PackageVersion Include="Xamarin.TestCloud.Agent" Version="0.23.2" />
    +    <PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.260317003" />
       </ItemGroup>
     </Project>
    \ No newline at end of file
    diff --git a/global.json b/global.json
    index 6611d206..b8bdc43a 100644
    --- a/global.json
    +++ b/global.json
    @@ -1,6 +1,6 @@
     {
       "msbuild-sdks": {
    -    "Uno.Sdk": "6.4.53"
    +    "Uno.Sdk": "6.6.0-dev.222"
       },
       "sdk": {
         "allowPrerelease": false

    but this fails to build:

    > dotnet build -f net9.0-desktop Chefs\Chefs.csproj -bl
      Chefs net9.0-desktop failed with 1 error(s) and 1 warning(s) (0.4s)
        C:\Program Files\dotnet\sdk\10.0.202\Microsoft.Common.CurrentVersion.targets(2451,5): warning MSB3277:
          Found conflicts between different versions of "WindowsBase" that could not be resolved.
          There was a conflict between "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=9.0.0.0, C
          ulture=neutral, PublicKeyToken=31bf3856ad364e35".
              "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=9
          .0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
              References which depend on "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Users\jon\.nuget\packages\micr
          osoft.netcore.app.ref\9.0.15\ref\net9.0\WindowsBase.dll].
                  C:\Users\jon\.nuget\packages\microsoft.netcore.app.ref\9.0.15\ref\net9.0\WindowsBase.dll
                    Project file item includes which caused reference "C:\Users\jon\.nuget\packages\microsoft.netcore.app.ref\9.0.15\ref\net9.0\WindowsBase.
          dll".
                      C:\Users\jon\.nuget\packages\microsoft.netcore.app.ref\9.0.15\ref/net9.0/WindowsBase.dll
              References which depend on or have been unified to "WindowsBase, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [].
                  C:\Users\jon\.nuget\packages\uno.winui.runtime.skia.wpf\6.6.0-dev.1382\lib\net9.0\Uno.UI.Runtime.Skia.Wpf.dll
                    Project file item includes which caused reference "C:\Users\jon\.nuget\packages\uno.winui.runtime.skia.wpf\6.6.0-dev.1382\lib\net9.0\Uno
          .UI.Runtime.Skia.Wpf.dll".
                      C:\Users\jon\.nuget\packages\uno.winui.runtime.skia.wpf\6.6.0-dev.1382\lib\net9.0\Uno.UI.Runtime.Skia.Wpf.dll
        C:\Users\jon\.nuget\packages\microsoft.windowsappsdk.base\1.8.251216001\buildTransitive\Microsoft.WindowsAppSDK.Base.targets(57,9): error The Windows App SDK requires a specific target OS version. Please set the <TargetFramework> property to an appropriate value. For more information, visit https://aka.ms/winappsdk.TFM.
    
  4. changed the title [-]Video playback fails on Windows-arm64[/-] [+]MediaPlayer fails on Windows-arm64[/+] on Apr 28, 2026
  5. added theissue type on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

kind/bugtriage/untriaged

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions