When I try to run Unit Tests (mstest) I run into this issue. The line of code:
_mainCnStr = System.Configuration.ConfigurationManager. C
I'm assuming mstests are, like nunit tests, embedded in a seperate assembly which gets loaded by the testing application? In that case, you may need to create some test set-up code which loads in the configuration file.