.NET Core3.1升级.NET5 oracle连接报错
如果报以下错误
The type initializer for 'OracleInternal.ServiceObjects.OracleConnectionImpl' threw an exception.
解决方式是将.csproj文件中插入以下红色代码:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <DocumentationFile></DocumentationFile> <EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization> </PropertyGroup>