VS 2012를 사용하고 설치 프로젝트가 제거되었으므로 InstallUtil.exe를 사용해야합니다.InstallUtil 도구를 사용하여 Windows 서비스를 설치할 수 없습니다.
내 Windows 서비스 응용 프로그램에 projectInstaller 클래스가 없습니다. 나는 명령 프롬프트에서 실행 :
installutil FilesMonitoringService.exe
내가 얻을 :
C : \ 프로그램 파일 \ 마이크 rosoft의 Visual Studio 8 \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC 번호> C "installutil \ VC# \ CSharpProjects \ MyService \ MyService \ bin \ Release \ MyServ ice.exe " Microsoft (R) .NET Framework 설치 유틸리티 버전 2.0.50727.42 저작권 (c) Microsoft Corporation. 판권 소유.
트랜잭션 설치를 실행 중입니다.
설치의 설치 단계가 시작됩니다. C : \ Program Files \ Microsoft Visual Studi 8 \ VC# \ CSharpProjects \ MyService \ MyService \ bin \ Release \ MyService.exe 어셈블리의 로그 파일 내용을 확인하십시오. . 파일은 C : \ Program Files \ Microsoft Visual Studio 8 \ VC# \ CSharpProj ects \ MyService \ MyService \ bin \ Release \ MyService.InstallLog에 있습니다. 어셈블리 'C : \ Program Files \ Microsoft Visual Studio 8 \ VC# \ CSharpProjec ts \ MyService \ MyService \ bin \ Release \ MyService.exe'를 설치하십시오. 영향을받는 매개 변수는 다음과 같습니다 logtoconsole = assemblypath = C : \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC# \ CSharpProjects \ 릴리스 \ MyService.exe이면 로그 파일 \ 이면 MyService \의이면 MyService \ bin에 = C : \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC# \ CSharpProjects \ MySer vice \ MyService \ bin \ Release \ MyService.InstallLog RunInstallerAttribute.Yes 특성이있는 공용 설치 관리자가 C : \ Program Files \ Microsoft Visual Studio 8 \ VC#에있는 찾을 수 없습니다. \ CSharpProjects \ MyService \ MyService \ bin \ Release \ MyService.exe 어셈블리입니다.
설치 단계가 성공적으로 완료되고 완료 단계가 시작됩니다. C : \ Program Files \ Microsoft Visual Studi 8 \ VC# \ CSharpProjects \ MyService \ MyService \ bin \ Release \ MyService.exe 어셈블리의 로그 파일 내용을 확인하십시오. . 파일은 C : \ Program Files \ Microsoft Visual Studio 8 \ VC# \ CSharpProj ects \ MyService \ MyService \ bin \ Release \ MyService.InstallLog에 있습니다. 'C : \ Program Files \ Microsoft Visual Studio 8 \ VC# \ CSharpProjec ts \ MyService \ MyService \ bin \ Release \ MyService.exe'어셈블리를 커밋 중입니다. 영향을받는 매개 변수는 다음과 같습니다 logtoconsole = assemblypath = C : \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC# \ CSharpProjects \ 릴리스 \ MyService.exe이면 로그 파일 \ 이면 MyService \의이면 MyService \ bin에 = C : \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC# \ CSharpProjects \ MySer vice \ MyService \ bin \ Release \ MyService.InstallLog RunInstallerAttribute.Yes 특성이있는 공용 설치 관리자가 C : \ Program Files \ Microsoft Visual Studio 8 \ VC#에있는 찾을 수 없습니다. \ CSharpProjects \ MyService \ MyService \ bin \ Release \ MyService.exe 어셈블리입니다. 설치 프로그램이 없기 때문에 InstallState 파일을 제거하십시오.
완료 단계가 성공적으로 완료되었습니다.
트랜잭션 설치가 완료되었습니다.
C : \ 프로그램 파일 \의 Microsoft Visual Studio 8 \ VC 번호>
OK는 모든 것이 설치되어있는 것 같다. 그러나! 서비스 페이지의 작업 관리자로 이동하면 서비스를 찾을 수 없습니다.
어떤 이유가있을 수 있습니까?
미리 감사드립니다. (대략적인 번역)
설치 : - :
편집 (> 설치를 추가 디자이너에서) 내가 get 명령 installutil 실행 나는 내가 그것을 추가하는 경우 때문에 projectInstaller 클래스를 필요가 없다는 지적 FilesMonitoringService ...이 설정 단계에서 로그 jornal 응용 프로그램에서은 EventLog FilesMonitoringService의 창조 ...
의 예외가 발생했습니다.
System.Security.SecurityException : 원본을 찾을 수 없지만 일부 또는 모든 로그 jornals에서 찾을 수 없습니다. 사용할 수없는 jornals : 보안.
반동 단계가 시작됩니다. 텍스트
의
// 많은 반동 단계는 succeded있다
설정 그룹 작업이 실행. 설치가 실패하고 반동이 실행되었습니다.
내 Windows 서비스에 projectInstller를 추가하면 installUtil과 함께 설치되지 않습니다.
[RunInstaller(true)]
public partial class ProjectInstaller : Installer
{
public ProjectInstaller()
{
InitializeComponent();
}
private void serviceInstaller1_AfterInstall(object sender, InstallEventArgs e)
{}
private void serviceProcessInstaller1_AfterInstall(object sender, InstallEventArgs e)
{}
}
Mabby 내가 afterInstall 방법으로 몇 가지 코드를 삽입해야합니다 여기
는 생성 된 코드인가? > FileMonitoringService, StartType - -> 자동
serviceProcessInstaller1 ServiceName은 : 계정 -> 로컬 시스템
아니면이 projectInstaller없이 구현 될 수
ServiceInstaller1의 : 나는 또한 properties
창에서이 properies을 설정?
2017 댓글 -이 주제는 이와 비슷한 SO 게시물에서 몇 가지 유용한 답변과 의견이 있습니다. http://stackoverflow.com/questions/7922105/install-windows-service-created-in-visual-studio –