我正在尝试学习log4net,但是,我的电脑中没有安装Visual Studio(由于缺乏管理权限)。所以,我在用WindowsXP的旧记事本编写代码。在这里,如果我想添加对log4net.dll的引用,我该怎么做?
很抱歉.NET太幼稚了。我只是在学习!
例如,这是我试图执行的示例代码。教程可用
here
.
using System;
namespace Tutorial1_GettingStarted
{
class Program
{
static void Main( string[] args )
{
log4net.Config.BasicConfigurator.Configure();
log4net.ILog log = log4net.LogManager.GetLogger( typeof( Program ) );
log.Debug( "Hello World!" );
log.Info( "I'm a simple log4net tutorial." );
log.Warn( "... better be careful ..." );
log.Error( "ruh-roh: an error occurred" );
log.Fatal( "OMG we're dooooooomed!" );
Console.ReadLine(); // so you can read the output
}
}
}