简体   繁体   中英

Why ServiceInstaller is not available in my "WPF App(.NET Framework)" projetct?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM