Page 1 of 1

Unable to resolve type VideoView

Posted: 26 Apr 2021 16:31
by quadbit
Greetings,

Just started with libvlcsharp in combination with .NET 5 and the Avalonia GUI framework and trying to work through the samples. In particular the sample C# project LibVLCSharp.Avalonia.Sample. Did come a long way but when building this in Visual Studio 2019 Pro I get the error:

Error XAMLIL Unable to resolve type VideoView from namespace clr-namespace:LibVLCSharp.Avalonia;assembly=LibVLCSharp.Avalonia Line 19, position 10. LibVLCSharp.Avalonia.Sample C:\Users\aadsz\source\src\LibVLCSharp.Avalonia.Sample\Views\MainWindow.xaml 19

For some reason I just cannot find the type VideoView in the object model (LibVLCSharp.Shared).

Any suggestions please?

Re: Unable to resolve type VideoView

Posted: 27 Apr 2021 04:10
by mfkl
Have you installed https://www.nuget.org/packages/LibVLCSharp.Avalonia/ ?

Please share your project on github/gitlab so we can have a look.

Re: Unable to resolve type VideoView

Posted: 27 Apr 2021 11:36
by quadbit
Have you installed https://www.nuget.org/packages/LibVLCSharp.Avalonia/ ?

Please share your project on github/gitlab so we can have a look.
Thank You, i am one step further. VideoView is recognised now. Next step is that I have to install the native library (of course!)

Re: Unable to resolve type VideoView

Posted: 27 Apr 2021 11:41
by quadbit
Have you installed https://www.nuget.org/packages/LibVLCSharp.Avalonia/ ?

Please share your project on github/gitlab so we can have a look.
Thank You, i am one step further. VideoView is recognised now. Next step is that I have to install the native library (of course!)
Just installed this as well: Install-Package VideoLAN.LibVLC.Windows -Version 3.0.12
I assume that version numbers (3.5.0 and 3.0.12) do not need to be identical?

Thanks!

Re: Unable to resolve type VideoView

Posted: 28 Apr 2021 03:40
by mfkl
I assume that version numbers (3.5.0 and 3.0.12) do not need to be identical?
Correct, those versions can be different, to a point. The major version numbers need to match though (3.x with 3.x, 4.x with 4.x, etc).