I couldn\'t figure out what is the problem for this exception.
The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception
I also faced that exception once when I reopened my project. In my case the Config file had empty tag and key as you can see below. I removed the appSettings tag to fix the problem.
< ?xml version="1.0" encoding="utf-8" ?>
< configuration>
< appSettings>
< add key="" value="site"/>
< /appSettings>
< configSections>
< /configSections>
< /configuration>