using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using log4net.Config;
namespace TestLog4Net
{
class Program
{
privatestaticreadonly ILog _log = LogManager.GetLogger(typeof(Program));
staticvoid Main(string[] args)
{
// Using the first method to setup log4net
DOMConfigurator.Configure();
_log.Debug("Here is a debug log.");
_log.Info("... and an Info log.");
_log.Warn("... and a warning.");
_log.Error("... and an error.");
_log.Fatal("... and a fatal error.");
Console.Read();
}
}
}

May 31, 2010

So I am trying to debug this Win service (built with VS2008) that references a module (DLL containing Managed C++ that was built with VS2010) and I keep getting a message box (see title) when attaching to the service process with VS2010.

Plowing through the web, found this solution that oddly enough worked: