1. Create a test project
2. After the project is created, we add an externaldll directory under the solution directory to store the DLL required by the project.
Then copy all the DLL files under wildfish/bin/release.
Right-click the solution to add-Add the existing projects that add all the DLL files to the solution.
3.
Add a reference to The bll project and select fishsky. dll.
4.
Create a winform project.
Add a reference to BLL and a reference to wildfish. dll log4net. dll.
Copy log4net. config from the configurationtool project to the current directory of the winform project.
Add it to the Project
Open the winform project properties, find buildevent, and add the following under pre-build event:Code
Copy $ (projectdir) log4net. CONFIG $ (targetdir) log4net. config
Open assemblyinfo. CS
Add the following code to the last line
[Assembly: log4net. config. xmlconfigurator (configfile = "log4net. config", watch = true)]
Open program. CS
Add at using
Using log4net. config;
Using system. IO;
Add the following code at the beginning of main:
Log4net. config. xmlconfigurator. Configure (New fileinfo ("log4net. config "));