Meta.Vlc
Meta.Vlc copied to clipboard
Latest nuget pkg won't allow x64 build
I installed Meta.Vlc via Nuget packages (v17.6.20). The project compiles and runs fine when building for x86 platform. It also compiles fine for x64 but when I try to run the app, I get this on InitializationComponent():
System.Windows.Markup.XamlParseException occurred HResult=0x80131501 Message='Set connectionId threw an exception.' Line number '8' and line position '5'. Source=PresentationFramework StackTrace: at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) at WpfApp1.MyVlcPlayer.InitializeComponent() in E:\projects\dotNet\WpfApp1\WpfApp1\VlcPlayer.xaml:line 1
Inner Exception 1: BadImageFormatException: Could not load file or assembly 'Meta.Vlc.Wpf, Version=16.5.1.0, Culture=neutral, PublicKeyToken=721a8c5379fa4056' or one of its dependencies. An attempt was made to load a program with an incorrect format.
This is what XAML code looks like:
<UserControl x:Class="WpfApp1.MyVlcPlayer"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WpfApp1"
xmlns:wpf="clr-namespace:Meta.Vlc.Wpf;assembly=Meta.Vlc.Wpf"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
d:DesignHeight="200" d:DesignWidth="400">
<Grid Height="200" Width="300">
<Grid.Resources>
<x:Array Type="{x:Type system:String}" x:Key="VlcOptions">
<system:String>-I</system:String>
<system:String>--ignore-config</system:String>
<system:String>--no-video-title</system:String>
<system:String>--no-sub-autodetect-file</system:String>
<system:String>--verbose=2</system:String>
<system:String>--no-audio</system:String>
</x:Array>
</Grid.Resources>
<wpf:VlcPlayer x:Name="MyVlcPlayer" VlcOption="{StaticResource VlcOptions}" LibVlcPath="..\..\LibVlc" EndBehavior="Nothing"/>
</Grid>
</UserControl>
Any ideas? Thank you in advance.
It works fine if I build the dlls myself and reference to them directly. If I use nuget packages, x64 build doesn't work
Same happens for me! This really should be fixed!
You can use our fork with x64 Vlc Lib. https://github.com/Simbioz/Meta.Vlc Just build Meta.Vlc in x64 and use it in your x64 project.
A+