Skip to content

Possibly broken NuGet package for System.Data.Odbc 7.0 #88281

Closed

Description

@gordon-matt

I am using .NET 7 and attempting to use the System.Data.Odbc 7.0 package. However, I keep getting a PlatformNotSupportedException. When navigating to the implementation of OdbcConnection I see this:

ODBC

This is not what I see in your source code, so what's going on here? What am I missing?

UPDATE: I should mention I am on Windows 10 and I have Office 2016. I am attempting to connect to an Access Database (.accdb).

Activity

  1. ghost added
    untriaged
    on Jul 1, 2023
  2. jkotas commented on Jul 1, 2023

    @jkotas
    Member

    I am using .NET 7 and attempting to use the System.Data.Odbc 7.0 package

    Could you please share a project that reproduces the problem?

    System.Data.Odbc package has multiple OS-specific implementations. This error means that you are using the placeholder implementation for unknown OS instead of the implementation for Windows.

    The default dotnet build and assembly loader should take care of this detail for you and pick the implementation for Windows without doing anything special. This sort of problem is typically encountered when assemblies are loaded manually by file paths instead of depending on the default dotnet behavior.

  3. 0xced commented on Jul 7, 2023

    @0xced
    Contributor

    I recently had the exact same issue when navigating to the implementation, i.e. ctrl + click on OdbcConnection and let Rider/ReSharper decompile the assembly.

    I think that the IDEs are not aware of the runtime loading rules. But indeed looking at %USERPROFILE%\.nuget\packages\system.data.odbc\7.0.0\runtimes\win\lib\net7.0\System.Data.Odbc.dll with JetBrains dotPeek produces the expected result.

  4. jkotas commented on Jul 8, 2023

    @jkotas
    Member

    I think that the IDEs are not aware of the runtime loading rules

    If the problem is in the IDE or the IDE extension, it should be filled in their respective issue tracing systems.

  5. added
    needs-author-action
    on Jul 8, 2023
  6. gordon-matt commented on Jul 10, 2023

    @gordon-matt
    Author

    I'm thinking it might have something to do with me targeting WinForms.. since I had no problem using it in a class lib in different solution. I'll give it another try later or create a WinForms demo app to show the issue.

  7. ghost removed
    needs-author-action
    on Jul 10, 2023
  8. SamMonoRT commented on Jun 21, 2024

    @SamMonoRT
    Member

    @gordon-matt - closing this issue, let us know if this is still a problem.

  9. removed
    untriaged
    on Jun 21, 2024
  10. locked and limited conversation to collaborators on Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions