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.