SQLitePCL.raw icon indicating copy to clipboard operation
SQLitePCL.raw copied to clipboard

Exception after updating from 2.0.8 to 2.1.0

Open m4r10guapito opened this issue 4 years ago • 8 comments

Hello guys,

First of all thanks for your work!

I'm having the following issue:

After updating from 2.0.8 to 2.1.0 (tried every preview) I get this exception when I try to create a new SQLiteConnection

System.TypeInitializationException: 'The type initializer for 'SQLite.SQLiteConnection' threw an exception'

Inner exception FileNotFoundException: Could not load file or assembly 'System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.

Going back to version 2.0.8 the problem disappear.

Please let me know if I need to do something special to get 2.1.0 version works.

Thanks in advance

-- Mario

m4r10guapito avatar Mar 28 '22 14:03 m4r10guapito

What platform and target framework is this?

Can you share your csproj?

ericsink avatar Mar 28 '22 14:03 ericsink

Windows application .NET Framework 4.7.2

I can't share my csproj but I can try to reproduce this behavior in a new project and share it. Let me know if you need it

Thanks

m4r10guapito avatar Mar 28 '22 14:03 m4r10guapito

Yeah, if you can provide a minimal repro project, that would be helpful.

ericsink avatar Mar 28 '22 14:03 ericsink

Ok, I'll try do it tomorrow thanks

m4r10guapito avatar Mar 28 '22 14:03 m4r10guapito

Hi, I tried to reproduce this problem in a new project but in a new project I don't see this problem. (same project type, same framework etc) I removed the reference from my project and add it again but still the same (cleaning obj, bin etc). Until 2.0.8 no problem and from 2.1.0 the problem come back.

If you have some idea about what can be the cause of this issue please write it.

In any case I'll continue to investigate on it

Bye

-- Mario

m4r10guapito avatar Mar 30 '22 11:03 m4r10guapito

Does your project include this? (It's in the newer project templates, but may be missing from older projects.)

<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>

bricelam avatar Apr 13 '22 22:04 bricelam

Yes it's included

m4r10guapito avatar Apr 14 '22 06:04 m4r10guapito

Noticed this problem as well, but for me, I'm on .NET Framework 4.8 and it couldn't find the e_sqlite library after upgrading to 2.1.0. It appears that the runtimes directory isn't being created in bin\Debug, and thus the e_sqlite library isn't found. I thought this was a VS2022 bug because 2019 is at end of support, but it's not.

DrewNaylor avatar May 27 '22 15:05 DrewNaylor

I'm seeing the same issue, using e_sqlcipher having upgraded from 2.0.7 to 2.1.1. It appears that the .targets file in SQLitePCLRaw.lib.e_sqlcipher is no longer being added to the project file. Looking at the nuget packages it looks like the location of the .targets file has changed from build to buildTransitive. Would this cause this problem?

image

twaddell avatar Sep 05 '22 12:09 twaddell

If your nuget is too old to support buildTransitive, then yes, I suspect that would cause this problem. Looks like nuget.exe 5.x is required for that feature. And I'm not sure whether buildTransitive works with packages.config or not.

ericsink avatar Sep 08 '22 14:09 ericsink

Yes, apparently buildTransitive only works with PackageReference, not with packages.config.

ericsink avatar Sep 08 '22 15:09 ericsink

Insofar as this issue relates to support for packages.config, it overlaps with #492 -- closing it as a dupe.

ericsink avatar Sep 19 '22 14:09 ericsink