Hi,
I just installed release June 2005 of Microsoft Enterprise Library and I'm trying out an Hello World of the Logging Block.
Here are the steps I did:
- I created a Windows Form (C#, Visual Studio 2003).
- Added the reference to the library: Microsoft.Practices.EnterpriseLibrary.Logging and added the
using
Microsoft.Practices.EnterpriseLibrary.Logging;
- Launched the “Enterprise Library Configuration“ tool.
- Created an application
- Added Logging.
- Saved the configuration to App.Config in my project
- Switched to the Visual Studio
- Did a “Show all files“
- added the app.config, logging*.config
- Created a post build event to copy the loggin*.config to my target folder
- Added this code:
private void Form1_Load(object sender, System.EventArgs e)
{
Logger.Write("Starting", "Trace",1);
Logger.Write("Started", "Trace",1);
}
- Run
- And got this error:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in system.dll
Additional information: Section or group name 'enterpriselibrary.configurationSettings' already defined
I want to resolve it. I think I understand how this error can come up, but can't understand why I get it.
Anyone seen this?
Pat