Replies: 1 comment 1 reply
-
All the 9.0.x NuGet packages have removed support for .NET 6. You are getting the fallback implementation for unsupported platforms. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After installing the latest NuGet package (9.0.2) the definition of the ServiceController class returns:
public partial class ServiceController : System.ComponentModel.Component
{
public ServiceController() { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_ServiceController); }
public ServiceController(string name) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_ServiceController); }
}
It seems like Visual Studio thinks that the code is not running on Windows.
The exception throws:
System.PlatformNotSupportedException: 'ServiceController enables manipulating and accessing Windows services and it is not applicable for other operating systems.'
It works as expected with version 8.0 of the package.
Beta Was this translation helpful? Give feedback.
All reactions