I am looking to use the System.ServiceProcess.ServiceController
class in a .NET Standard 2.0 project. In order to do so I downloaded the Microsoft.Windows.Compatibility packet from NuGet, whic includes among other things ( I also tried to simply download the System.ServiceProcess.ServiceController packet by itself). I can now use the ServiceController without any problem within my class, but when I try to run the program I get:
System.IO.FileNotFoundException: Could not load file or assembly 'System.ServiceProcess.ServiceController, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
I guess I'm missing something crucial here, especially since as far as I can tell the version I installed is 4.5.0 and the version it is looking for is the 4.2.1.0. What am I doing wrong?