I configured log4net for my project in my App.config file.I called the set up method in my program.cs file like this
static Program()
{
XmlConfigurator.Configure();
GlobalContext.Properties["LogName"] = "Today";
}
I don’t want to call the method in my static consstructor,i learned that it also can be configured in the AssemblyInfo.cs file more gracefully like this
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
but my AssemblyInfo.cs file has not found
I tried the answer from this question:Visual Studio 2017 – AssemblyInfo.cs not found
- Gregory Bologna’s answser’ step3 confused me as i am using visua stduio 2022,i have not found the assembly information button,but a assembly name button.
- Daleman’s asnwser didn’t work me,i tried unload and reload my projects serveral times.