Visual Studio 2010'da yeni bir Windows Hizmeti oluşturduğumda, InstallUtil ve net start hizmetini kullanacaklarını belirten bir mesaj alıyorum.
Aşağıdaki adımları denedim:
- Create new project File -> New -> Project -> Windows Service
- Project Name: TestService
- Build project as is (Service1 constructor, OnStart, OnStop)
- Open command prompt, run "C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe" TestService.exe
- Run net start TestService.
4. adımın çıkışı
İşlem gören bir yüklemeyi çalıştırma.
Yüklemenin Yükleme aşamasını başlatma.
için günlük dosyasının içeriğine bakın.
C: \ Kullanıcılar \ kullanıcı adı \ Belgeler \ Visual Studio
2010 \ Projects \ Testservice \ Testservice \ obj \ x86 \ Debug \ TestService.exe
meclisin gelişimi.
Dosya C: \ Users \ myusername \ Documents \ Visual Studio'da bulunur
Projeler \ Tes \ 2010
tService \ Testservice \ obj \ x86 \ Debug \ TestService.InstallLog.
'C: \ Users \ myusername \ Documents \ Visual Studio derlemesini yükleme
2010 \ Projects \ TestS ervice \ TestService \ obj \ x86 \ Debug \ TestService.exe '.
Etkilenen parametreler:
logtoconsole =
logfile = C: \ Users \ myusername \ Documents \ Visual Studio
2010 \ Projects \ Testservice \ T
estService \ obj \ x86 \ Debug \ TestService.InstallLog
assemblypath = C: \ Users \ myusername \ Documents \ Visual Studio
2010 \ Projeler \ TestServ buz \ TestService \ obj \ x86 \ Debug \ TestService.exe
RunInstallerAttribute.Yes özniteliğine sahip genel yükleyici yok
C: \ Users \ myusername \ Documents \ Visual Studio’da bulunabilir
2010 \ Projects \ TestService \ TestSe rvice \ obj \ x86 \ Debug \ TestService.exe
Montaj.
Yükleme aşaması başarıyla tamamlandı ve Teslim aşaması
başlayan.
için günlük dosyasının içeriğine bakın.
C: \ Kullanıcılar \ kullanıcı adı \ Belgeler \ Visual Studio
2010 \ Projects \ Testservice \ Testservice \ obj \ x86 \ Debug \ TestService.exe
meclisin gelişimi.
Dosya C: \ Users \ myusername \ Documents \ Visual Studio'da bulunur
Projeler \ Tes \ 2010
tService \ Testservice \ obj \ x86 \ Debug \ TestService.InstallLog.
Montajı tamamlama 'C: \ Users \ myusername \ Documents \ Visual Studio
2010 \ Projects \ TestS ervice \ TestService \ obj \ x86 \ Debug \ TestService.exe '.
Etkilenen parametreler:
logtoconsole =
logfile = C: \ Users \ myusername \ Documents \ Visual Studio
2010 \ Projects \ Testservice \ T
estService \ obj \ x86 \ Debug \ TestService.InstallLog
assemblypath = C: \ Users \ myusername \ Documents \ Visual Studio
2010 \ Projeler \ TestServ buz \ TestService \ obj \ x86 \ Debug \ TestService.exe
RunInstallerAttribute.Yes özniteliğine sahip genel yükleyici yok
C: \ Users \ myusername \ Documents \ Visual Studio’da bulunabilir
2010 \ Projects \ TestService \ TestSe rvice \ obj \ x86 \ Debug \ TestService.exe
Montaj.
Yükleyici olmadığından InstallState dosyasını kaldırın.
Komisyon aşaması başarıyla tamamlandı.
İşlem yapılan yükleme tamamlandı.
5. adımın çıkışı
Servis adı geçersiz.
NET HELPMSG 2185 yazarak daha fazla yardım alabilirsiniz.