我可以在ASP.NET Core 2.0应用程序中引用RegistryKey类,但不能在Console .NET 2.0 Core应用程序中引用。为什么会这样呢?
当我尝试引用RegistryKey中的OpenBaseKey()(一个静态方法)时,会出现以下编译错误。
The name 'RegistryKey' does not exist in the current context
我正在使用VS2017,我的项目是针对.NET Core 2.0进行开发(不是Standard 2.0)。