The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception 解决方法

运行一程序提示:The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception


解决方法:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config


找到一能正常运行的机器,把此文件copy过来替换掉 即可。

原文地址:https://www.cnblogs.com/robinli/p/2654628.html