I'm developing a WPF application for implementing a serial interface. I am implementing MVVM structure using MVVMCross framework. MVVMCross uses two projects in a solution, one is the core application that is a .NET class library, and the other is the WPF project.
Models and viewmodels exist in the .NET class library (.NET Standard 2.0). Serial port class does not exist in this standard but there is a System.IO.Ports nuget package to use serial ports.
My problem begins here, i am trying to use this nuget package but whenever i use serialport class, app throws an System.IO.FileNotFoundException. In the output it says (MvxBeginner.Core is the project name):
Exception thrown: 'System.IO.FileNotFoundException' in MvxBeginner.Core.dll
An exception of type 'System.IO.FileNotFoundException' occurred in MvxBeginner.Core.dll but was not handled in user code
I am not sure if this exception is related with .net standard or with MVVMCross. If anyone have any ideas i would really appreciate it.
Well, i tried to solve this problem for a day. Problem is solved when i added the nuget package to WPF project as well. Before that i installed nuget package only to the core project.