I am loading a .NET application using the ICLRRuntimeHost::ExecuteInDefaultAppDomain
method which starts the application up fine. However, the application is using Log4Net
with which it should output an info message after starting up, but it never does. It works fine when opening it up normally though, so it must be something with the CLR Hosting environment that makes it unable to function properly, I just don't know what exactly.
Here is the code that does the logging:
using System;
using System.Windows.Forms;
using log4net;
namespace TestApplication
{
public partial class MainForm : Form
{
private static readonly ILog log = LogManager.GetLogger
(MethodBase.GetCurrentMethod().DeclaringType);
public MainForm()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
log.Info("Application has started");
}
}
}