Closed WonderGnagno closed 1 week ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Tagging subscribers to this area: @roji, @ajcvickers See info in area-owners.md if you want to be subscribed.
Author: | WonderGnagno |
---|---|
Assignees: | - |
Labels: | `untriaged`, `area-System.Data.Odbc` |
Milestone: | - |
This package has OS-specific implementations, e.g. package/runtimes/linux/lib/net6.0/System.Data.Odbc.dll is the Linux implementation. However, the general lib/net6.0/System.Data.Odbc.dll is a stub implementation. It sounds like this particular deployment configuration is picking up that stub implementation, because you're requesting portable assemblies but this package's "portable" assemblies are fake.
@ViktorHofer, what's the expected behavior here?
@WonderGnagno @ViktorHofer - can this be closed?
I must have missed this ping back in March last year. I will take a look later today or latest tomorrow.
Hi All, I resolved creating different distributions and not portable. I don't know if the issue is still present. We should have a look to .NET 8.
BR Enrico
Assigning to @ViktorHofer for tracking
From what I know (cc @ericstj to double check) the behavior is the following when it comes to rid specific assets:
Scenario 1: A project sets the RuntimeIdentifier/s
property or it gets passed in from the CLI (manually or automatically)
Scenario 2: A project doesn't specify the RuntimeIdentifier/s
property and it also isn't passed in from the CLI
lib/<tfm>/
and the runtimes/...
assemblies) and lists them (in the project.assets.json file).runtimes/<RID>/
folder.In this scenario, the app might not specify a RID at build time or the host might not be able to resolve the RID at run time.
Based on the screenshot shared this is a framework dependent app - so it should be scenario 2 above. @ViktorHofer your explanation is correct.
In this scenario, the app might not specify a RID at build time or the host might not be able to resolve the RID at run time.
Another case could be the RID for the host doesn't import the linux
RID, so the app doesn't select the linux
assets. This can often happen when running on a new distro or new version of a distro with some unmapped RID. In this case the repro says the OS is Oracle Linux Server release 8.6
- it's possible the RID used is not mapped. https://github.com/dotnet/runtime/blob/68438edabab1c2eb578d830112dd10752548a3b2/src/libraries/Microsoft.NETCore.Platforms/src/runtimeGroups.props#L140-L145
Checking the host logs around selecting the Odbc.dll on the repro system is the right next steps to diagnose this problem. Those should list which RID the host was using and which copy of each library it decided to use. https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#corehost_trace Yet another case could be the app was launched without a deps file, or the load was from a context that didn't use the deps file.
@WonderGnagno if you'd like us to help further, please share host traces on the OS that has the undesired behavior.
This issue has been marked needs-author-action
and may be missing some important information.
This issue has been automatically marked no-recent-activity
because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity
.
This issue will now be closed since it had been marked no-recent-activity
but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.
Description
Hi, running a simple code in Linux environment I noticed that the var OdbcFactory.Instance is null. It happens if I publish the software setting as the target runtime to Portable. See image below.
If i set linux-x64 it works.
This problem happen only if I run on Linux enviroment.
Here my execution
Linux OS![image](https://user-images.githubusercontent.com/22641826/222568230-0c227cba-86fe-4447-8080-10a360f66a42.png)
Reproduction Steps
Solution1.zip
Expected behavior
OdbcFactory.Instance != null
Actual behavior
OdbcFactory.Instance == null
Regression?
No response
Known Workarounds
No response
Configuration
Which version of .NET is the code running on? .net core 6 What OS and version, and what distro if applicable? Oracle Linux Server release 8.6 What is the architecture (x64, x86, ARM, ARM64)? x64 Do you know whether it is specific to that configuration? publish target runtime portable
Other information
No response