Question Error 19 'LogManager' is an ambiguous reference


Well-known member
Nov 13, 2012
Programming Experience
I am getting the error message,"Error 19 'LogManager' is an ambiguous reference between 'Common.Logging.LogManager' and 'NLog.LogManager'".
In a C# 2008 application I am trying to add nlog open source logging tool to an application that is already using common.logging that was obtained from the following location: Common Infrastructure Libraries for .NET.
I have added a reference to the NLog file and I have added the Nlog to the using statement.
The problem is both tools use an object called 'LogManager'.
Thus can you tell me how to solve my problem so I can use both Logmanagers.
The following is my code listed below:
<?xml version="1.0" encoding="utf-8" ?>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
<nlog xmlns="" xmlns:xsi="">

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common.Logging;
using sample;
using System.Configuration;
using System.Xml.Linq;
using NLog;
namespace sample
public class Etest
private static Logger logger = LogManager.GetCurrentClassLogger();
private static ILog log = LogManager.GetCurrentClassLogger();
Qualify which type you mean, "NLog.LogManager" or "Logging.LogManager".
Top Bottom