1

On a C# code, I'm having an error during the installation of a service using installUtil. I'm using my own installer. All the code on the installer and the parameters to installUtil are ok, because the installation works ok on 90% of cases. The failing scenario is under my CI jobs, I'm installing several services in parallel using the same code, and I'm having an impossible to catch exception. All I have is in logs the following message:

An exception occurred during the Commit phase of the System.Configuration.Install.AssemblyInstaller installer. System.InvalidOperationException: Collection was modified; enumeration operation may not execute. An exception occurred during the Commit phase of the installation. This exception will be ignored and installation will continue. However, the application might not function correctly after installation is complete.

I have put logs during all phases and method I'm able to override, on my own installer class, also I got some source code of System.Configuration.Install.Installer, I'm logging also there but nothing...

Exception is happening after the Install method and before the Commit.

Just before the execution of Commit phase of System.Configuration.Install.Installer, there is some code with this output:

Logs as follow:

The Install phase completed successfully, and the Commit phase is beginning. See the contents of the log file... Committing assembly .... Affected parameters are:.... An exception occurred during the Commit phase of the System.Configuration.Install.AssemblyInstaller... The Commit phase completed successfully. The transacted install has completed. An exception occurred during the Commit phase of the installation.

As you can see, exception comes after the Install phase and before the Commit phase, but nowhere on my custom Installer class or on all overridden methods of System.Configuration.Install.Installer

Can anyone give me some hint about how to catch this exception or a better view of the full workflow executed during service install ??

thanks

user810917
  • 241
  • 4
  • 12

1 Answers1

0

After look at InstallUtil source code, we have found that the /LogFile parameter, used carefully and in the good place, do the job to have dedicated log file by running instances. in our test scenarios the command line was not well constructed and LogFile param was getting ignored...

user810917
  • 241
  • 4
  • 12