How to solve: The type or namespace name ‘log4net’ could not be found in .NET 4.0?
If you create a new .NET 4.0 console application in Microsoft Visual Studio .NET 2010 and add a reference to the Log4Net v1.2.10 dll, you can add the using statement [using log4net;], but after a rebuild, Microsoft Visual Studio still reports the error:
Error 29 The type or namespace name ‘log4net’ could not be found (are you missing a using directive or an assembly reference?)
This is caused by the [Target framework] is set to the [.NET Framework 4 Client Profile]. This profile does not include some .NET assemblies found in the Full .NET Framework, that are used by log4net.
As can be seen with RegGate Reflactor, log4net uses Full .NET Framework assemblies:
Set the [Target framework] of your application to [.NET Framework 4].C#, Log4Net