I am following this article: https://www.codeproject.com/Articles/285964/WPF-Webcam-Control?fid=1666019&df=90&mpp=25&sort=Position&spc=Relaxed&prof=True&view=Normal&fr=1#xx0xx When I run the program I always get the same error. Error: System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Expression.Encoder.Utilities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.'
I tried to find that Utilities file but I couldn't find it. I checked the comments on the article and there were a couple of people with the same problem. I did change the Active solution platform to x86 as well but that did nothing.
using System.Windows;
using Microsoft.Expression.Encoder.Devices;
using System.Collections.ObjectModel;
namespace Webcam
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public Collection<EncoderDevice> VideoDevices { get; set; }
public Collection<EncoderDevice> AudioDevices { get; set; }
public MainWindow()
{
InitializeComponent();
this.DataContext = this;
VideoDevices =
EncoderDevices.FindDevices(EncoderDeviceType.Video);
AudioDevices =
EncoderDevices.FindDevices(EncoderDeviceType.Audio);
}
}
The error always occurs on the line VideoDevices = EncoderDevices.FindDevices(EncoderDeviceType.Video);