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
"System.Data.SqlClient is not supported on this platform" on .NET 6 on RHEL and AlmaLinux, works fine on .NET 5 and under Ubuntu #1643
We have a cross platform ASP.NET 6.0 app (published as "portable") that runs fine on Windows, Ubuntu etc, but throws the above error on RHEL and AlmaLinux. Reverting to the older version of the app that targets .NET 5 works fine.
Both versions System.Data.SqlClient 4.8.3 and Microsoft.Data.SqlClient throw this error. My connection-string uses an SQL user with a password, not using Kerberos or windows-integrated authentication.
System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
at Microsoft.Data.SqlClient.SqlConnection..ctor(String connectionString)
To reproduce
Create a .NET Core 6.0 app that references SqlClient, publish, deploy to RHEL, run with dotnet MyProject.dll
THIS IS TRIVIALLY REPRODUCABLE on AlmaLinux 8 under WSL2 (available in MS Store). But it works fine under Ubuntu under WSL2.
Install WSL2, install Almalinux 8 from MS Store, run sudo yum install dotnet-sdk-6.0 -y to install dotnet, then run the app using dotnet MyProject.dll
Almalinux dotnet--info output:
.NET SDK (reflecting any global.json):
Version: 6.0.105
Commit: 679e7e16e1
Runtime Environment:
OS Name: almalinux
OS Version: 8.5
OS Platform: Linux
RID: rhel.8-x64
Base Path: /usr/lib64/dotnet/sdk/6.0.105/
Host (useful for support):
Version: 6.0.5
Commit: 70ae3df4a6
.NET SDKs installed:
6.0.105 [/usr/lib64/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [/usr/lib64/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/lib64/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download```
changed the title [-]"System.Data.SqlClient is not supported on this platform" on .NET 6, works fine on .NET5[/-][+]"System.Data.SqlClient is not supported on this platform" on .NET 6 on RHEL and AlmaLinux, works fine on .NET 5 and under Ubuntu[/+]on Jun 15, 2022
@alex-jitbit this seems like duplication of #1390 and some other similar issues when using Kerberos authentication on Unix. Please check that issue thread.
The System version of the library can only be updated as part of the runtime. The last runtime it shipped with was netcore 3.1. So regardless of the bug status I don't think it's going to get fixed in the System version.
Can you try with the Microsoft version of the library from this repo and see if it reproduces?
@JRahnama nope, I'm not using docker, it's a standalone SQL Server installation, accessed over network. And a standalone aspnetcore app (also - not in docker)
System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform.
: at Microsoft.Data.SqlClient.SqlConnection..ctor(String connectionString)
The exception is trivially reproducible on WSL2: just install AlmaLinux 8 from MS Store and run any NET6 app. SqlConnection constructor throws this error.
NET5 works fine. NET6 also works fine, but only on Ubuntu, not RHEL or its forks
**Manually installing the SDK into a folder from the dot.net downloads page and changing my /usr/bin/dotnet symbolic link path to that custom folder did resolve the problem... BUT
Example sudo ln -s /usr/lib/dotnet/custom/dotnet /usr/bin/dotnet
**Step 3 introduced a new bug/problem. I was able to get the application to startup and run but noticed that several of my EF Core queries stopped returning data. Even though the logged query should have returned something.
**[EDIT] Upon further inspection my PC is set to EST and the date was suppose to be UTC and it made a conversion which is why the query returned different reuslts. This is likely my bug. Step 3 is the winner
Running the application using a docker container referencing image mcr.microsoft.com/dotnet/sdk:6.0-jammy does work fine. Which confuses me because I am on the same version of Ubuntu (POP_OS!)
Reacted by Gerhard Just-Olsen
Reacted by Evgeny Gorbovoy
Reacted by Gustavo Mauricio de Barros, AraHaan and Gerhard Just-Olsen
Apparently this problem is affected by the value of RuntimeInformation.RuntimeIdentifier
I ran into it by moving from Fedora 36 to Nobara 36 which is just Fedora with some modifications.
I went to /etc/os-release and changed ID from "nobara" to "fedora", which also changed RuntimeInformation.RuntimeIdentifier from "nobara.36-x64" to "fedora.36-x64" and everything worked again, so I guess it may be possible to fiddle with some of the values in this (or similar) file on other systems to make them fit into supported whitelist. I understand this can probably be dangerous and is not something anyone should normally do but maybe this information can be helpful to some people.
I tried looking into possibility of temporarily changing these values just to run dotnet and apparently on systems with lsb_release like Ubuntu it is possible to set path to os info with LSB_ETC_LSB_RELEASE variable but I don't see anything of the sort for Fedora/Red Hat. You can install lsb_release on Fedora but idk if this would change anything.
I was able to bypass this issue by putting all of EFCore (and Microsoft.Data.SqlClient) into generic linux-* rids and then manually installing them via extraction from tar.gz files into the $DOTNET_ROOT this resulted in when I tried to run my discord bot in it working on all linux based OS's because I used the generic linux based RIDs for them (and it with r2r).
Also doing such bypass as an experiment also allowed me to be able to roll forward new updates to efcore to the discord bot without needing to rebuild which for me is a bonus because of servicing releases being considered critical for me (also the fact that rebuilding can be a nightmare).
I managed to get it running using this workaround.
Note: Frist I tried using the installer script dotnet-install.sh, but that didn't work. Simply downloading and extracting the binary manually worked fine.
closing this as it's not an issue with the Microsoft.Data.SqlClient client package.
Does anyone have a link to another bug report? I'm not sure I understand the problem correctly, and I can't find out where to go to follow up on this issue.
@alex-jitbit can you still reproduce this on RHEL 8 (not Alma)? Do you have a complete project I can copy and run?
My understanding is that this is an issue in how a source-built .NET (that is, the version included in Linux distro repositories, not the Microsoft-built .NET) can have a broken Runtime Identifer (RID) graph, or a bug in how the RID itself is computed.
That results in .NET being unable to navigate the RID graph to go from "This is distro $foo" (eg, the RID almalinux.8-x64) to "This is a Linux/Unix OS" (the RID unix). Microsoft.Data.SqlClient is shipped in a couple of variants: unix and windows. If the .NET runtime can't do a fallback from your system's RID to unix or windows, it uses the non-OS System.Data.SqlClient, which is essentially empty and just prints errors.
This is also why something like <Exec Command="cp $(OutDir)runtimes/unix/lib/netcoreapp3.1/System.Data.SqlClient.dll $(OutDir)" /> works: it tells .NET to use the System.Data.SqlClient for the unix RID directly without asking your .NET runtime to resolve your OS's RID.
To see if your .NET runtime is affected by the bug, compare the OS Name/OS Version/RID values from dotnet --info with the runtimes property in your .NET runtime's shared/Microsoft.NETCore.App/$VERSION/Microsoft.NETCore.App.deps.json file.
For example, on RHEL 8, the RID values look consistent and appear in the RID fallback graph in the Microsoft.NETCore.App.deps.json file. System.Data.SqlClient should work here.
Go to your deps.json file on your OS, which in /usr/lib/dotnet/shared/Microsoft.NETCore.App/6.x.x/Microsoft.NETCore.App.deps.json
You will need sudo permission able to edit the file
Replace the "runtimes" section with things you copied in your clipboard.
Be aware that this is not 100% sure SQLClient will working probably after this.
Reacted by Martin Berg Alstad, butrov, Kostas Gkoutis, Garrett Kelly and Mr Kaos
This is my Visual Studio publish profile it works also I agree that does not work in other situations.
I don't know which is the select target runtime within this profile as well
Activity
[-]"System.Data.SqlClient is not supported on this platform" on .NET 6, works fine on .NET5[/-][+]"System.Data.SqlClient is not supported on this platform" on .NET 6 on RHEL and AlmaLinux, works fine on .NET 5 and under Ubuntu[/+]JRahnama commentedon Jun 15, 2022
@alex-jitbit this seems like duplication of #1390 and some other similar issues when using Kerberos authentication on Unix. Please check that issue thread.
alex-jitbit commentedon Jun 15, 2022
@JRahnama nope, not using Kerberos auth, simply MS SQL user with password. This is a library/targeting/dependency issue, strictly
ErikEJ commentedon Jun 15, 2022
What is your Publish command?
alex-jitbit commentedon Jun 15, 2022
@ErikEJ it's
dotnet publish ..\path\to\MyProject.csproj --configuration Release -o path\to\OutputFolderOnce again, the same build works fine on Ubuntu, Windows Server etc. But some linux distros throw this error.
Wraith2 commentedon Jun 16, 2022
The System version of the library can only be updated as part of the runtime. The last runtime it shipped with was netcore 3.1. So regardless of the bug status I don't think it's going to get fixed in the System version.
Can you try with the Microsoft version of the library from this repo and see if it reproduces?
JRahnama commentedon Jun 19, 2022
@alex-jitbit I will look into this, but as a wild guess could this be related/similar to #1249 and #81?
alex-jitbit commentedon Jun 19, 2022
@JRahnama nope, I'm not using docker, it's a standalone SQL Server installation, accessed over network. And a standalone aspnetcore app (also - not in docker)
alex-jitbit commentedon Jun 19, 2022
@Wraith2 just tried with Microsoft.Data.SqlClient
! SAME ERROR !alex-jitbit commentedon Jun 19, 2022
The exception is trivially reproducible on WSL2: just install
AlmaLinux 8from MS Store and run any NET6 app.SqlConnectionconstructor throws this error.NET5 works fine. NET6 also works fine, but only on Ubuntu, not RHEL or its forks
ErikEJ commentedon Jun 19, 2022
Have you tried using the latest SDK?
alex-jitbit commentedon Jun 19, 2022
@ErikEJ no, but I have tried installing dotnet as described in MS docs
Have you tried the steps to repro I provided?
AraHaan commentedon Jun 20, 2022
I would try it with the latest .NET 6 servicing release first.
30 remaining items
gumbarros commentedon Sep 21, 2022
Anyone solved this on Pop!_OS 22.04?
EDIT: Solved installing the dotnet SDK manually and setting the path manually on Rider.
https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.401-linux-x64-binaries
jsheely commentedon Sep 22, 2022
So I've been working on this problem for a little bit and here is what I've encountered
apt install dotnet6causes the problem/usr/bin/dotnetsymbolic link path to that custom folder did resolve the problem... BUTExample
sudo ln -s /usr/lib/dotnet/custom/dotnet /usr/bin/dotnet**Step 3 introduced a new bug/problem. I was able to get the application to startup and run but noticed that several of my EF Core queries stopped returning data. Even though the logged query should have returned something.
**[EDIT] Upon further inspection my PC is set to EST and the date was suppose to be UTC and it made a conversion which is why the query returned different reuslts. This is likely my bug. Step 3 is the winner
mcr.microsoft.com/dotnet/sdk:6.0-jammydoes work fine. Which confuses me because I am on the same version of Ubuntu (POP_OS!)iihmsunn commentedon Sep 25, 2022
Apparently this problem is affected by the value of RuntimeInformation.RuntimeIdentifier
I ran into it by moving from Fedora 36 to Nobara 36 which is just Fedora with some modifications.
I went to /etc/os-release and changed ID from "nobara" to "fedora", which also changed RuntimeInformation.RuntimeIdentifier from "nobara.36-x64" to "fedora.36-x64" and everything worked again, so I guess it may be possible to fiddle with some of the values in this (or similar) file on other systems to make them fit into supported whitelist. I understand this can probably be dangerous and is not something anyone should normally do but maybe this information can be helpful to some people.
I tried looking into possibility of temporarily changing these values just to run dotnet and apparently on systems with lsb_release like Ubuntu it is possible to set path to os info with LSB_ETC_LSB_RELEASE variable but I don't see anything of the sort for Fedora/Red Hat. You can install lsb_release on Fedora but idk if this would change anything.
lcheunglci commentedon Sep 27, 2022
closing this as it's not an issue with the Microsoft.Data.SqlClient client package.
AraHaan commentedon Sep 27, 2022
I was able to bypass this issue by putting all of EFCore (and Microsoft.Data.SqlClient) into generic linux-* rids and then manually installing them via extraction from tar.gz files into the
$DOTNET_ROOTthis resulted in when I tried to run my discord bot in it working on all linux based OS's because I used the generic linux based RIDs for them (and it with r2r).Also doing such bypass as an experiment also allowed me to be able to roll forward new updates to efcore to the discord bot without needing to rebuild which for me is a bonus because of servicing releases being considered critical for me (also the fact that rebuilding can be a nightmare).
cinmay commentedon Oct 3, 2022
I managed to get it running using this workaround.
Note: Frist I tried using the installer script dotnet-install.sh, but that didn't work. Simply downloading and extracting the binary manually worked fine.
cinmay commentedon Oct 3, 2022
Does anyone have a link to another bug report? I'm not sure I understand the problem correctly, and I can't find out where to go to follow up on this issue.
GaganKumar98 commentedon Oct 11, 2022
Yes I do But still facing the same Issue
omajid commentedon Jan 30, 2023
@alex-jitbit can you still reproduce this on RHEL 8 (not Alma)? Do you have a complete project I can copy and run?
My understanding is that this is an issue in how a source-built .NET (that is, the version included in Linux distro repositories, not the Microsoft-built .NET) can have a broken Runtime Identifer (RID) graph, or a bug in how the RID itself is computed.
That results in .NET being unable to navigate the RID graph to go from "This is distro $foo" (eg, the RID
almalinux.8-x64) to "This is a Linux/Unix OS" (the RIDunix). Microsoft.Data.SqlClient is shipped in a couple of variants:unixandwindows. If the .NET runtime can't do a fallback from your system's RID tounixorwindows, it uses the non-OSSystem.Data.SqlClient, which is essentially empty and just prints errors.This is also why something like
<Exec Command="cp $(OutDir)runtimes/unix/lib/netcoreapp3.1/System.Data.SqlClient.dll $(OutDir)" />works: it tells .NET to use theSystem.Data.SqlClientfor theunixRID directly without asking your .NET runtime to resolve your OS's RID.To see if your .NET runtime is affected by the bug, compare the
OS Name/OS Version/RIDvalues fromdotnet --infowith theruntimesproperty in your .NET runtime'sshared/Microsoft.NETCore.App/$VERSION/Microsoft.NETCore.App.deps.jsonfile.For example, on RHEL 8, the RID values look consistent and appear in the RID fallback graph in the
Microsoft.NETCore.App.deps.jsonfile.System.Data.SqlClientshould work here.Compare that with
alpine:edgewhich is known to be broken (dotnet/runtime#73525). In this case, theOS VersionandRIDindotnet --infodon't match:HT-Dat commentedon Feb 25, 2023
With @omajid suggestion, I was able to change the Microsoft.NETCore.App.deps.json so I can use SQLClient without having to install the binary version and playing around with paths
First I went to download the .NET 6 binaries from here: https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.401-linux-x64-binaries
Extract the archive and go to ./shared/Microsoft.NETCore.App/6.x.x/Microsoft.NETCore.App.deps.json
Copy all of the data inside the "runtimes" section. In my case, it will look like this
"runtimes": { "alpine-x64": [ "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.10-x64": [ "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.11-x64": [ "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.12-x64": [ "alpine.3.12", "alpine.3.11-x64", "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.13-x64": [ "alpine.3.13", "alpine.3.12-x64", "alpine.3.12", "alpine.3.11-x64", "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.14-x64": [ "alpine.3.14", "alpine.3.13-x64", "alpine.3.13", "alpine.3.12-x64", "alpine.3.12", "alpine.3.11-x64", "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.15-x64": [ "alpine.3.15", "alpine.3.14-x64", "alpine.3.14", "alpine.3.13-x64", "alpine.3.13", "alpine.3.12-x64", "alpine.3.12", "alpine.3.11-x64", "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.16-x64": [ "alpine.3.16", "alpine.3.15-x64", "alpine.3.15", "alpine.3.14-x64", "alpine.3.14", "alpine.3.13-x64", "alpine.3.13", "alpine.3.12-x64", "alpine.3.12", "alpine.3.11-x64", "alpine.3.11", "alpine.3.10-x64", "alpine.3.10", "alpine.3.9-x64", "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.6-x64": [ "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.7-x64": [ "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.8-x64": [ "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "alpine.3.9-x64": [ "alpine.3.9", "alpine.3.8-x64", "alpine.3.8", "alpine.3.7-x64", "alpine.3.7", "alpine.3.6-x64", "alpine.3.6", "alpine-x64", "alpine", "linux-musl-x64", "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android-x64": [ "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.21-x64": [ "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.22-x64": [ "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.23-x64": [ "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.24-x64": [ "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.25-x64": [ "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.26-x64": [ "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.27-x64": [ "android.27", "android.26-x64", "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.28-x64": [ "android.28", "android.27-x64", "android.27", "android.26-x64", "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.29-x64": [ "android.29", "android.28-x64", "android.28", "android.27-x64", "android.27", "android.26-x64", "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.30-x64": [ "android.30", "android.29-x64", "android.29", "android.28-x64", "android.28", "android.27-x64", "android.27", "android.26-x64", "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "android.31-x64": [ "android.31", "android.30-x64", "android.30", "android.29-x64", "android.29", "android.28-x64", "android.28", "android.27-x64", "android.27", "android.26-x64", "android.26", "android.25-x64", "android.25", "android.24-x64", "android.24", "android.23-x64", "android.23", "android.22-x64", "android.22", "android.21-x64", "android.21", "android-x64", "android", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "arch-x64": [ "arch", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "centos-x64": [ "centos", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "centos.7-x64": [ "centos.7", "centos-x64", "rhel.7-x64", "centos", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "centos.8-x64": [ "centos.8", "centos-x64", "rhel.8-x64", "centos", "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "centos.9-x64": [ "centos.9", "centos-x64", "rhel.9-x64", "centos", "rhel.9", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "debian-x64": [ "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "debian.10-x64": [ "debian.10", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "debian.11-x64": [ "debian.11", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "debian.8-x64": [ "debian.8", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "debian.9-x64": [ "debian.9", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "exherbo-x64": [ "exherbo", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora-x64": [ "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.23-x64": [ "fedora.23", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.24-x64": [ "fedora.24", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.25-x64": [ "fedora.25", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.26-x64": [ "fedora.26", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.27-x64": [ "fedora.27", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.28-x64": [ "fedora.28", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.29-x64": [ "fedora.29", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.30-x64": [ "fedora.30", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.31-x64": [ "fedora.31", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.32-x64": [ "fedora.32", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.33-x64": [ "fedora.33", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.34-x64": [ "fedora.34", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.35-x64": [ "fedora.35", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.36-x64": [ "fedora.36", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "fedora.37-x64": [ "fedora.37", "fedora-x64", "fedora", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "gentoo-x64": [ "gentoo", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linux-musl-x64": [ "linux-musl", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linux-x64": [ "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.17-x64": [ "linuxmint.17", "ubuntu.14.04-x64", "ubuntu.14.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.17.1-x64": [ "linuxmint.17.1", "linuxmint.17-x64", "linuxmint.17", "ubuntu.14.04-x64", "ubuntu.14.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.17.2-x64": [ "linuxmint.17.2", "linuxmint.17.1-x64", "linuxmint.17.1", "linuxmint.17-x64", "linuxmint.17", "ubuntu.14.04-x64", "ubuntu.14.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.17.3-x64": [ "linuxmint.17.3", "linuxmint.17.2-x64", "linuxmint.17.2", "linuxmint.17.1-x64", "linuxmint.17.1", "linuxmint.17-x64", "linuxmint.17", "ubuntu.14.04-x64", "ubuntu.14.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.18-x64": [ "linuxmint.18", "ubuntu.16.04-x64", "ubuntu.16.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.18.1-x64": [ "linuxmint.18.1", "linuxmint.18-x64", "linuxmint.18", "ubuntu.16.04-x64", "ubuntu.16.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.18.2-x64": [ "linuxmint.18.2", "linuxmint.18.1-x64", "linuxmint.18.1", "linuxmint.18-x64", "linuxmint.18", "ubuntu.16.04-x64", "ubuntu.16.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.18.3-x64": [ "linuxmint.18.3", "linuxmint.18.2-x64", "linuxmint.18.2", "linuxmint.18.1-x64", "linuxmint.18.1", "linuxmint.18-x64", "linuxmint.18", "ubuntu.16.04-x64", "ubuntu.16.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.19-x64": [ "linuxmint.19", "ubuntu.18.04-x64", "ubuntu.18.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.19.1-x64": [ "linuxmint.19.1", "linuxmint.19-x64", "linuxmint.19", "ubuntu.18.04-x64", "ubuntu.18.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "linuxmint.19.2-x64": [ "linuxmint.19.2", "linuxmint.19.1-x64", "linuxmint.19.1", "linuxmint.19-x64", "linuxmint.19", "ubuntu.18.04-x64", "ubuntu.18.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol-x64": [ "ol", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7-x64": [ "ol.7", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.0-x64": [ "ol.7.0", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.1-x64": [ "ol.7.1", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.2-x64": [ "ol.7.2", "ol.7.1-x64", "rhel.7.2-x64", "ol.7.1", "rhel.7.2", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.3-x64": [ "ol.7.3", "ol.7.2-x64", "rhel.7.3-x64", "ol.7.2", "rhel.7.3", "ol.7.1-x64", "rhel.7.2-x64", "ol.7.1", "rhel.7.2", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.4-x64": [ "ol.7.4", "ol.7.3-x64", "rhel.7.4-x64", "ol.7.3", "rhel.7.4", "ol.7.2-x64", "rhel.7.3-x64", "ol.7.2", "rhel.7.3", "ol.7.1-x64", "rhel.7.2-x64", "ol.7.1", "rhel.7.2", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.5-x64": [ "ol.7.5", "ol.7.4-x64", "rhel.7.5-x64", "ol.7.4", "rhel.7.5", "ol.7.3-x64", "rhel.7.4-x64", "ol.7.3", "rhel.7.4", "ol.7.2-x64", "rhel.7.3-x64", "ol.7.2", "rhel.7.3", "ol.7.1-x64", "rhel.7.2-x64", "ol.7.1", "rhel.7.2", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.7.6-x64": [ "ol.7.6", "ol.7.5-x64", "rhel.7.6-x64", "ol.7.5", "rhel.7.6", "ol.7.4-x64", "rhel.7.5-x64", "ol.7.4", "rhel.7.5", "ol.7.3-x64", "rhel.7.4-x64", "ol.7.3", "rhel.7.4", "ol.7.2-x64", "rhel.7.3-x64", "ol.7.2", "rhel.7.3", "ol.7.1-x64", "rhel.7.2-x64", "ol.7.1", "rhel.7.2", "ol.7.0-x64", "rhel.7.1-x64", "ol.7.0", "rhel.7.1", "ol.7-x64", "rhel.7.0-x64", "ol.7", "rhel.7.0", "ol-x64", "rhel.7-x64", "ol", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.8-x64": [ "ol.8", "ol-x64", "rhel.8-x64", "ol", "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ol.8.0-x64": [ "ol.8.0", "ol.8-x64", "rhel.8.0-x64", "ol.8", "rhel.8.0", "ol-x64", "rhel.8-x64", "ol", "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse-x64": [ "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.13.2-x64": [ "opensuse.13.2", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.15.0-x64": [ "opensuse.15.0", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.15.1-x64": [ "opensuse.15.1", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.42.1-x64": [ "opensuse.42.1", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.42.2-x64": [ "opensuse.42.2", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "opensuse.42.3-x64": [ "opensuse.42.3", "opensuse-x64", "opensuse", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel-x64": [ "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.6-x64": [ "rhel.6", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7-x64": [ "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.0-x64": [ "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.1-x64": [ "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.2-x64": [ "rhel.7.2", "rhel.7.1-x64", "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.3-x64": [ "rhel.7.3", "rhel.7.2-x64", "rhel.7.2", "rhel.7.1-x64", "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.4-x64": [ "rhel.7.4", "rhel.7.3-x64", "rhel.7.3", "rhel.7.2-x64", "rhel.7.2", "rhel.7.1-x64", "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.5-x64": [ "rhel.7.5", "rhel.7.4-x64", "rhel.7.4", "rhel.7.3-x64", "rhel.7.3", "rhel.7.2-x64", "rhel.7.2", "rhel.7.1-x64", "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.7.6-x64": [ "rhel.7.6", "rhel.7.5-x64", "rhel.7.5", "rhel.7.4-x64", "rhel.7.4", "rhel.7.3-x64", "rhel.7.3", "rhel.7.2-x64", "rhel.7.2", "rhel.7.1-x64", "rhel.7.1", "rhel.7.0-x64", "rhel.7.0", "rhel.7-x64", "rhel.7", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.8-x64": [ "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.8.0-x64": [ "rhel.8.0", "rhel.8-x64", "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.8.1-x64": [ "rhel.8.1", "rhel.8.0-x64", "rhel.8.0", "rhel.8-x64", "rhel.8", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "rhel.9-x64": [ "rhel.9", "rhel-x64", "rhel", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles-x64": [ "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.12-x64": [ "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.12.1-x64": [ "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.12.2-x64": [ "sles.12.2", "sles.12.1-x64", "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.12.3-x64": [ "sles.12.3", "sles.12.2-x64", "sles.12.2", "sles.12.1-x64", "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.12.4-x64": [ "sles.12.4", "sles.12.3-x64", "sles.12.3", "sles.12.2-x64", "sles.12.2", "sles.12.1-x64", "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.15-x64": [ "sles.15", "sles.12.4-x64", "sles.12.4", "sles.12.3-x64", "sles.12.3", "sles.12.2-x64", "sles.12.2", "sles.12.1-x64", "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "sles.15.1-x64": [ "sles.15.1", "sles.15-x64", "sles.15", "sles.12.4-x64", "sles.12.4", "sles.12.3-x64", "sles.12.3", "sles.12.2-x64", "sles.12.2", "sles.12.1-x64", "sles.12.1", "sles.12-x64", "sles.12", "sles-x64", "sles", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu-x64": [ "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.14.04-x64": [ "ubuntu.14.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.14.10-x64": [ "ubuntu.14.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.15.04-x64": [ "ubuntu.15.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.15.10-x64": [ "ubuntu.15.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.16.04-x64": [ "ubuntu.16.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.16.10-x64": [ "ubuntu.16.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.17.04-x64": [ "ubuntu.17.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.17.10-x64": [ "ubuntu.17.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.18.04-x64": [ "ubuntu.18.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.18.10-x64": [ "ubuntu.18.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.19.04-x64": [ "ubuntu.19.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.19.10-x64": [ "ubuntu.19.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.20.04-x64": [ "ubuntu.20.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.20.10-x64": [ "ubuntu.20.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.21.04-x64": [ "ubuntu.21.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.21.10-x64": [ "ubuntu.21.10", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ], "ubuntu.22.04-x64": [ "ubuntu.22.04", "ubuntu-x64", "ubuntu", "debian-x64", "debian", "linux-x64", "linux", "unix-x64", "unix", "any", "base" ] }Go to your deps.json file on your OS, which in /usr/lib/dotnet/shared/Microsoft.NETCore.App/6.x.x/Microsoft.NETCore.App.deps.json
You will need sudo permission able to edit the file
Replace the "runtimes" section with things you copied in your clipboard.
Be aware that this is not 100% sure SQLClient will working probably after this.
shawnklewis commentedon May 22, 2023
Throwing in my 2 cents
I set the target runtime as linux-x64 and the Deployment mode as "Self-Contained"
It started on AlmaLinux.
mdora7 commentedon Jul 4, 2023
This is my Visual Studio publish profile it works also I agree that does not work in other situations.
I don't know which is the select target runtime within this profile as well
otaviosgoncalves commentedon Jan 9, 2024
works for me, thanks