I would like to install and uninstall a windows service programmably, But i can not use ServiceInstaller in my "WPF App(.NET Framework)" project.
Did i miss some references?
In a project that targets the .NET Framework, you should add a reference to System.ServiceProcess
under Project->Add Reference->Assemblies->Framework.
The ServiceInstaller
class is not available in .NET Core or .NET 5.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.