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

e_sqlite3.dll not included in single file output with Native AOT compilation #1243

Open
CodeFanaticX opened this issue Jul 17, 2024 · 2 comments

Comments

@CodeFanaticX
Copy link

Issue Description:

Environment:

  • OS: Windows 10
  • .NET version: .NET 9
  • Library: sqlite-net (using Microsoft.Data.Sqlite for SQLite interaction)

Problem:
When compiling my project with Native AOT settings aimed at producing a single file executable, the e_sqlite3.dll is not included in the compiled output. This results in runtime errors due to the absence of the e_sqlite3.dll native library, which is crucial for SQLite functionalities.

Expected Behavior:
The Native AOT compilation process should include all necessary DLLs into the single executable file, ensuring that no external dependencies are required at runtime for SQLite functionalities.

Actual Behavior:
The e_sqlite3.dll is not embedded within the single executable, necessitating manual inclusion or other workarounds to ensure that the application functions correctly after deployment.

Steps to Reproduce:

  1. Create a .NET console application.
  2. Add the sqlite-net-pcl NuGet package to the project, which relies on Microsoft.Data.Sqlite.
  3. Implement functionality to interact with an SQLite database using the sqlite-net library.
  4. Configure the project for Native AOT compilation with the option to produce a single file executable.
  5. Compile and deploy the application.
  6. Run the executable on a system without e_sqlite3.dll located in the application directory or system path.
@ericsink
Copy link
Contributor

Unless something has changed, sqlite-net-pcl does not rely on Microsoft.Data.Sqlite. Did you mean that it relies on SQLitePCLRaw ?

@CodeFanaticX
Copy link
Author

sqlite-net-pcl

Ahm I'm not sure but I used sqlite-net-pcl but after compiling it's still separating the e_sqlite3.dll.

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