Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest nuget pkg won't allow x64 build #246

Open
Rust76 opened this issue Sep 21, 2017 · 3 comments
Open

Latest nuget pkg won't allow x64 build #246

Rust76 opened this issue Sep 21, 2017 · 3 comments

Comments

@Rust76
Copy link

Rust76 commented Sep 21, 2017

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.

@Rust76 Rust76 closed this as completed Sep 21, 2017
@Rust76 Rust76 reopened this Sep 21, 2017
@Rust76
Copy link
Author

Rust76 commented Sep 21, 2017

It works fine if I build the dlls myself and reference to them directly. If I use nuget packages, x64 build doesn't work

@rusagent
Copy link

rusagent commented Feb 9, 2018

Same happens for me! This really should be fixed!

@beaulieufrancois
Copy link

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+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants