Exception: type initializer for 'system.data.sqlclient.sqlconnection'?

后端 未结 12 914
悲哀的现实
悲哀的现实 2020-12-11 02:35

I couldn\'t figure out what is the problem for this exception.

The type initializer for \'System.Data.SqlClient.SqlConnection\' threw an exception

12条回答
  •  一向
    一向 (楼主)
    2020-12-11 02:51

    Check if you have the following Windows hotfix installed - KB2840628 - for the .NET FW 4.0 (use Windows Control Panel->Programs+Features and click 'view installed updates') and if so try uninstalling it...

    https://connect.microsoft.com/VisualStudio/feedback/details/793500/sqlclr-typeinitializationexception-in-sqlconnection-since-kb2840628

    It resolved the problem for me.

提交回复
热议问题