Cannot print exception string using Oracle.ManagedDataAccess
So I tried to use
Oracle.ManagedDataAccess on a .Net Core 3.0 project. But when trying to do queries, it failed with this error message:
Cannot print exception string because Exception.ToString() failed.
Duck Duck Go could not help me since the exception text could not be shown and there was nothing to search for. But when something that should be easy appears to be hard, there’s a good chance that you’re doing something wrong. So it was also this time.
Visual Studio for Mac gave me this helpful exclamation mark, leading me to the answer.
Oracle provides two NuGet packages, one for the regular .Net Framework, one for .Net Core. Similar, but not the same and I used the wrong one! For .Net Core, use the
Oracle.ManagedDataAccess.Core and watch this problem disappear.