I couldn\'t figure out what is the problem for this exception.
The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception
If you have a project that contains the NuGet packages for both Oracle and SQL Server, this solution might help you fix this error.
Uninstall both of these NuGet packages:
Open your app.config and check if you still have have any dependent assembly entries listed. If you do, delete those entries now. They might look something like this:
While still in your app.config file, delete the entire Oracle Managed Data Access section if it exists (This might be the only thing that you need to do to fix this problem, however we performed all of the steps listed in this solution). If you have it, it might look something like this:
Open the packages.config file and double check to ensure that the entries for the Oracle and SQL Server packages are not still listed - they should be gone, but it doesn't hurt to be 100% sure.
Save your project, and then re-add the NuGet packages.