You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Possibly broken NuGet package for System.Data.Odbc 7.0 #88281
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:
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).
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.
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.
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.
ghost removed
needs-author-actionAn issue or pull request that requires more info or actions from the author.
Activity
jkotas commentedon Jul 1, 2023
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.
0xced commentedon Jul 7, 2023
I recently had the exact same issue when navigating to the implementation, i.e. ctrl + click on
OdbcConnectionand 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.dllwith JetBrains dotPeek produces the expected result.jkotas commentedon Jul 8, 2023
If the problem is in the IDE or the IDE extension, it should be filled in their respective issue tracing systems.
gordon-matt commentedon Jul 10, 2023
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.
SamMonoRT commentedon Jun 21, 2024
@gordon-matt - closing this issue, let us know if this is still a problem.