如何在.NET Standard项目(System.ServiceProcess.ServiceController)中使用.NET Framework类

时间:2018-09-11 14:19:10

标签: c# .net-standard .net-standard-2.0 servicecontroller

我希望在.NET Standard 2.0项目中使用@import Controller, { inject as controller } from '@ember/controller'; export default Controller.extend({ parent: controller(), // use actual name of parent route controller actions: { resetAllParams() { this.get('parent').send('resetAllParams'); } } }); 类。为了做到这一点,我从NuGet下载了Microsoft.Windows.Compatibility数据包,其中包括其他内容(我还尝试自己单独下载System.ServiceProcess.ServiceController数据包)。现在,我可以在班级内使用ServiceController而没有任何问题,但是当我尝试运行程序时,我得到了:

System.ServiceProcess.ServiceController

我想我这里缺少一些关键的东西,特别是因为据我所知我安装的版本是4.5.0,而正在寻找的版本是4.2.1.0。我在做什么错了?

0 个答案:

没有答案