-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Missing libSystem.Net.Security.Native.so when publishing self-contained single-file project on Linux #88481
Comments
Tagging subscribers to this area: @DavoudEshtehari, @David-Engel, @JRahnama Issue DetailsDescriptionWhen publishing a .NET project as a self-contained single-file application on the Linux platform, the resulting binary does not include the required Reproduction Steps
Code sample:
Expected behaviorThe published self-contained single-file binary should include the Actual behaviorRunning the program results in the following exception:
Regression?No response Known WorkaroundsThe known workaround, which is unacceptable for self-contained single-file programs, is to ensure ConfigurationNo response Other informationNo response
|
The problem is that Until it is fixed, the best thing you can do is to not use single-file deployments here. |
The fix to SqlClient was actually merged very recently: dotnet/SqlClient#2063. I am not sure if it shipped, or whether it will be available on .NET 8 only or also .NET 7 (depends on how they multi-target the libs). |
As @filipnavara mentioned the fix has been added recently and it will be available on the next preview release at the end of current month. |
To clarify, it can only be fixed against .NET 7+. The new authentication APIs in .NET that are required for SqlClient to support |
Closing this issue as resolved in Microsoft.Data.SqlClient 5.2 preview 2 and won't fix in System.Data.SqlClient. |
Description
When publishing a .NET project as a self-contained single-file application on the Linux platform, the resulting binary does not include the required
libSystem.Net.Security.Native.so
library. This issue is observed specifically when usingMicrosoft.Data.SqlClient
orSystem.Data.SqlClient
libraries and calling theSqlConnection.Open()
method withIntegrated_Security=true
in the connection string.Reproduction Steps
Write a program which uses the
Microsoft.Data.SqlClient
orSystem.Data.SqlClient
libraries.Call the
SqlConnection.Open()
method withIntegrated_Security=true
in the connection string.Build the project:
dotnet publish --framework net6.0 --runtime linux-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true
Execute the published binary.
Encounter the following exception if:
libSystem.Net.Security.Native.so
is not present in the program's directory or library path, or:Code sample:
Expected behavior
The published self-contained single-file binary should include the
libSystem.Net.Security.Native.so
library, ensuring the program's functionality without the need for manual copying of the library or the need for the dotnet framework to be installed on the local machine.Actual behavior
Running the program results in the following exception:
Regression?
No response
Known Workarounds
The known workaround, which is unacceptable for self-contained single-file programs, is to ensure
libSystem.Net.Security.Native.so
is in the library path of the running program.Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: