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

Duplicate sqlite dll on build #72

Open
alex6dj opened this issue Apr 22, 2024 · 3 comments
Open

Duplicate sqlite dll on build #72

alex6dj opened this issue Apr 22, 2024 · 3 comments

Comments

@alex6dj
Copy link

alex6dj commented Apr 22, 2024

Hi Im creating a new project and want to use this library. Im trying to use a password protected SQlite DB. For this I should reference microsoft.entityframeworkcore.sqlite.core because it dont have an sqlite dll embeded and use sqlitepclraw.bundle_e_sqlcipher wich support encrypted DB.

The issue is that EntityFramework.Exceptions have an internal dependency in microsoft.data.sqlite without core and the result build contains both sqlite versions.

The result buid:
With EntityFramework.Exceptions contains e_sqlcipher.dll and e_sqlite3.dll
image

Without EntityFramework.Exceptions, only e_sqlcipher.dll
image

Any workaround is welcome.

Thanks in advance.

@Giorgi
Copy link
Owner

Giorgi commented Apr 22, 2024

Is simply deleting e_sqlite3.dll from the bin directory enough? If yes you could add a post build step as a workaround.

@alex6dj
Copy link
Author

alex6dj commented Apr 22, 2024

Well Im not shure if deleting e_sqlite3.dll from the bin directory is enough. I will do some tests later.
About the post build. I check an there are several files that should be deleted. Im doing this
image
and seems to work during a normal build
image
but fails when publishing single file (and Aot) using console
image
Im not really good with build tooling, any help is welcome.

@alex6dj
Copy link
Author

alex6dj commented Apr 28, 2024

I, sorry for the late answer. I check and droping e_sqlite3.dll manually solve the problem and some basic testing shows the app only using the e_sqlcipher.dll. Is yet to test if trimming remove the unneeded dll or not. Just need to find a way to remove before single file generation.

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