Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ppc64le][.net7] Unhandled Exception: System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform #11675

Closed
3 tasks
janani66 opened this issue Nov 18, 2022 · 1 comment

Comments

@janani66
Copy link

janani66 commented Nov 18, 2022

[x ] This issue is blocking the use of System.Data.Odbc on ppc64le

Support for ppc64le architecture was added in .NET7. Using this, we were trying some sample code which uses System.Data.Odbc package.

The sample code works on x86 machine with .NET7. The .csproj has the following:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net7.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="System.Data.Odbc" Version="7.0.0" />
  </ItemGroup>

</Project>


But on Power ppc64le machine we are getting below error

# dotnet run 
Unhandled Exception:
 System.PlatformNotSupportedException: 
System.Data.ODBC is not supported on this platform. at System.Data.Odbc.OdbcConnection..ctor(String connectionString)   at ConsoleApplication1.Program.Main(String[] args) in /root/samples/odbc_sample/Program.cs:line 19 

[ERROR] FATAL UNHANDLED EXCEPTION: 
System.PlatformNotSupportedException: System.Data.ODBC is not supported on this platform. 
at System.Data.Odbc.OdbcConnection..ctor(String connectionString) at ConsoleApplication1.Program.Main(String[] args) in /root/samples/odbc_sample/Program.cs:line 19

During debugging what we found MSBuild::GetTargetPlatformIdentifier () may be returning empty string and this (https://github.com/dotnet/runtime/blob/main/src/libraries/System.Data.Odbc/src/System.Data.Odbc.csproj#L27) code throwing error. When we check the MSBuild repo https://github.com/dotnet/msbuild we don’t see ppc64le changes in eng/common/cross folder.

https://github.com/dotnet/msbuild/blob/main/eng/common/README.md says "The files in this directory are shared by all Arcade repos and managed by automation. If you need to make changes to these files, open an issue or submit a pull request to https://github.com/dotnet/arcade first." --

Question @akoeplinger :
Since the https://github.com/dotnet/arcade/tree/main/eng/common/cross has support for ppc64le, does it also need to get propagated to msbuild?

We are also not sure if this is the root cause of the problem.

Release Note Category

  • Feature changes/additions
  • Bug fixes
  • Internal Infrastructure Improvements

Release Note Description

@akoeplinger
Copy link
Member

Let's use the runtime issue so we don't have two places to discuss this: dotnet/runtime#78563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants