Why my C# does not have System.ServiceProcess Library?

前端 未结 3 1139
故里飘歌
故里飘歌 2021-01-07 18:17

This is the code. I just wanna test the library of System.ServiceProcess library.

using System;
using System.Collections.Generic;
using System.Linq;
using Sy         


        
相关标签:
3条回答
  • 2021-01-07 18:43

    you should add this from framework list Right click on the project -> Add Reference -> search under "Assemblies" -> select->OK

    0 讨论(0)
  • 2021-01-07 18:57

    You need to add a reference to the corresponding .dll as well.

    Right click on the project -> Add Reference -> Assemblies -> Framework -> System.ServiceProcess

    0 讨论(0)
  • 2021-01-07 19:00

    System.ServiceProcess namespace belongs on System.ServiceProcess.dll and it doesn't added as a reference by default.

    For this, in the solution window, right click on "References" and choose "Add Reference.." Go to the .NET tab, and double click on System.ServiceProcess.dll.

    enter image description here

    This assembly is probably in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder.

    0 讨论(0)
提交回复
热议问题