VS2012 Log4Net installation and use
1. Download Log4Net
Follow this document: VS2012 C# Use/Configure Log4Net
If Nuget is not connected to the Internet, please refer to: vs2010 nuget basic connection has been closed: an error occurred while sending
If the architecture is incompatible during installation, please refer to here: The architecture version is not compatible with the NuGet version. Solution (copy the PM command corresponding to the old version, click VS Tools -> Library Package Manager, and paste the copied command to the console Just run it)
PM> Install-Package log4net -Version 2.0.3
已成功安装“log4net 2.0.3”。
已成功将“log4net 2.0.3”添加到 W1。
2. Configure and use Log4Net
Reference: Log4Net configuration usage and VS2012 C# usage/configuration Log4Net
3. Verification
- If you are running in Debug mode, check if there are log4net.dll and log4.config files in the bin/debug directory;
- If you are running in release mode, check if there are log4net.dll and log4.config files in the bin/release directory
After running the program: The generated log folder log is also in the corresponding bin/debug or bin/release directory.