Skip to content

System.Data.Odbc PlatformNotSupportedException #898

Open
@esso23

Description

@esso23

System.Data.Odbc v4.7.0
Platform: Windows Server 2019 version 1809 (build 17763.805)
Runtime: .NET Core 3.1 (Library with odbc dependency is .NET Standard 2.1)
Exception:

System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform.
   at System.Data.Odbc.OdbcConnection..ctor(String connectionString)
   at Connector.SysCfg.Odbc.OdbcSysCfgRepository..ctor(String dsnName) in D:\Sync\Repositories-Ipecon\paragon-platform\src\Connector.SysCfg\Odbc\OdbcSysCfgRepository.cs:line 28
...

Code:

mConnection = new OdbcConnection($"DSN={mDsnName};");

Additional info:
Just migrated from .NET Framework 4.6.1 to .NET Core 3.1 on the same machine. OdbcConnection worked fine on .NET Framework 4.6.1.
Application is x86.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions