NServiceBus.host.exeで/ installフラグを呼び出すと、アプリケーションイベントログの下にイベントログソースが作成されていることに気付きました。問題は、NServiceBus L4Nを設定して、同じソースにカスタムイベントログの下にイベントを書き込むことです。カスタムログへのNServiceBusのログ
私たちがカスタムイベントログのもとでソースを作成すると、インストールが失敗します(NserviceBusインストーラはSystem.ArgumentExceptionをスローします:ソースはローカルコンピュータに既に存在しています)。
NServiceBusインストーラがアプリケーションイベントログの下にイベントソースを作成しないようにするにはどうすればよいですか?完全なスタックトレース
Creating EventLog source blah in log Application...
An exception occurred during the Install phase.
System.ArgumentException: Source blah already exists
on the local computer.
The Rollback phase of the installation is beginning.
Restoring event log to previous state for source blah
.
Service blah is being removed from the system...
Service blah was successfully removed from the system
.
The Rollback phase completed successfully.
Unhandled Exception: System.InvalidOperationException: The installation failed, and the rollback has been performed. ---> System.ArgumentException: Source blah already exists on the local computer.
at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
at System.Diagnostics.EventLogInstaller.Install(IDictionary stateSaver)
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at System.ServiceProcess.ServiceInstaller.Install(IDictionary stateSaver)
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at Topshelf.Internal.Hosts.HostServiceInstaller.Install(IDictionary stateSaver)
in d:\dev\open-source\topshelf\src\Topshelf\Internal\Hosts\HostServiceInstaller.cs:line 120
at System.Configuration.Install.Installer.Install(IDictionary stateSaver)
at System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
--- End of inner exception stack trace ---
at System.Configuration.Install.TransactedInstaller.Install(IDictionary savedState)
at Topshelf.Internal.Hosts.HostServiceInstaller.Register() in d:\dev\open-source\topshelf\src\Topshelf\Internal\Hosts\HostServiceInstaller.cs:line 61
at Topshelf.Internal.Actions.InstallServiceAction.Do(IRunConfiguration configuration) in d:\dev\open-source\topshelf\src\Topshelf\Internal\Actions\InstallServiceAction.cs:line 42
at Topshelf.Runner.Host(IRunConfiguration configuration, String[] args) in d:\dev\open-source\topshelf\src\Topshelf\Runner.cs:line 70
at NServiceBus.Hosting.Windows.Program.Main(String[] args) in d:\BuildAgent-03\work\nsb.masterbuild1\src\hosting\NServiceBus.Hosting.Windows\Program.cs:line 122
NServiceBusはコンソール/ファイルにのみロギングするので、実際のロギングには関係していないと確信しています。私は100%確信していませんが、Windowsサービスをインストールするとイベントソースが作成されると思いますか? –
トップシェルフが自動的にソースを作成している可能性があります。私は少し深く掘る必要があります –
私はまったく同じ問題を抱えています。あなたはそれを引き起こしていたことを知りましたか? –