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

2.0.5 breaks with .NET Framework, non-SDK-style projects #446

Closed
m4r10guapito opened this issue Sep 1, 2021 · 14 comments
Closed

2.0.5 breaks with .NET Framework, non-SDK-style projects #446

m4r10guapito opened this issue Sep 1, 2021 · 14 comments

Comments

@m4r10guapito
Copy link

Hello,

not sure if this issue is related with #444 and/or #445, in any case with version 2.0.4 it works fine while with 2.0.5 I get the following exception when I try to create a new SQLiteConnection

InnerException = {"Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
Message = "The type initializer for 'SQLite.SQLiteConnection' threw an exception."

I'm using Windows10 and VisualStudio2019

Please tell me if you need more information.

Thanks in advance

--
Mario

@ericsink
Copy link
Owner

ericsink commented Sep 1, 2021

I'm using Windows10 and VisualStudio2019

Yes, please post a minimal repro sample project.

@m4r10guapito
Copy link
Author

Here you can find a small program that reproduce the error

https://1drv.ms/u/s!Aut18fzhwlA_j_RP70xXEbnlcQ1euQ?e=XAaxlB

@gnimor
Copy link

gnimor commented Sep 2, 2021

I can see the same issue here

@ericsink
Copy link
Owner

ericsink commented Sep 2, 2021

Initial findings for @m4r10guapito : That repro sample uses .NET Framework (not .NET Core), old (non-SDK-style) projects, and packages.config (not PackageReference), which is not something I test with. The problem appears to be that the targets file is not copying the DLLs over.

@ericsink
Copy link
Owner

ericsink commented Sep 2, 2021

@gnimor You may be seeing the same issue or you may not. Most "Unable to load DLL" errors look the same, but the underlying causes can be very different.

@gnimor
Copy link

gnimor commented Sep 2, 2021

@ericsink: I think it is the same issue because I have also a .NET framework project (not the SDK-style) and I am also using the packages.config approach. After reverting back to the 2.0.4 the issue is gone.

@ericsink ericsink changed the title Problems with release 2.0.5 2.0.5 breaks with .NET Framework, non-SDK-style projects, and packages.config Sep 2, 2021
@m4r10guapito
Copy link
Author

For your information: I migrate my project from packages.config to PackageReference but still the same.
2.0.4 works
2.0.5 not works

@ericsink
Copy link
Owner

ericsink commented Sep 2, 2021

@m4r10guapito That's good to know. Thanks.

@ericsink ericsink changed the title 2.0.5 breaks with .NET Framework, non-SDK-style projects, and packages.config 2.0.5 breaks with .NET Framework, non-SDK-style projects Sep 2, 2021
@ericsink
Copy link
Owner

ericsink commented Sep 2, 2021

Need to investigate differences between this issue and #444. Do non-SDK style projects work okay with 2.0.5 when NOT building for AnyCPU?

@m4r10guapito
Copy link
Author

With x86 or x64 it works.
AnyCPU not work

@ericsink
Copy link
Owner

ericsink commented Sep 2, 2021

Ah. So it looks probable that this bug and #444 may be the same thing.

ericsink added a commit that referenced this issue Sep 29, 2021
…et framework now uses the dynamic provider again, but now the search possibilities includes WHERE_ADJACENT to catch the case where a RuntimeIdentifier was specified so the right dll ends up adjacent to the other outputs instead of in a runtime/rid subdir. trying to un-break anycpu builds. attempts to fix #444 and #446 and #451
@ericsink
Copy link
Owner

Try 2.0.7-pre20210929171745 ?

@m4r10guapito
Copy link
Author

Just tried and it seems to works fine!
I'll continue using it and in case of issue I'll advise you.

Thank you

@ericsink
Copy link
Owner

Fixed in 2.0.7, now on nuget.org

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

3 participants