I got an error when using Windows Installer to set the event source in the product that I am deploying.
The error message I get contains the following ...
Unable to get installer types in c: \ temp \ program.exe. β Failed to load one or more of the requested types. Check out the LoaderExceptions property for more info.
Here is the code block that the event source installer creates ...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Configuration.Install; using System.Diagnostics; namespace myapplication { [RunInstaller(true)] public partial class EventSourceInstaller : Installer { public EventSourceInstaller() { InitializeComponent(); string eventSourceName = "MyAppSourceName"; if (!EventLog.SourceExists(eventSourceName)) { EventSourceCreationData data = new EventSourceCreationData(eventSourceName, "Application"); EventLog.CreateEventSource(data); EventLog.WriteEntry(eventSourceName, "Source Added."); } } } }
In the installer project, I added a custom installation action called "Initial Output from MyApplication (Active)" to start the event source installer.
I have the following questions:
source share