Using Enterprise Library Logging
To get logging working without pesky WMI/Performance counter errors on every logged event:
Go to the Logging project, Project Properties dialog for the Common project, and under Configuration Properties\Build, find the Conditional Compilation Properties property and remove ;USEWMI;USEPERFORMANCECOUNTER for the build type ...
more ...