Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQLite reference warning processor mismatch

I just changed from SQL server to SQLite, everything went perfectly fine, everything is working fine, the only thing that bothers me is that I get a warning about a mismatch with the SQLite reference, below the warning message:

Warning 1 There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. LivePigeonClient

Did I install the wrong reference? Or do I really need to set the target of my application to x86? Because that is not what I want, does anybody have some suggestions about what to do, to get rid of this warning?

Thanks for your time!

like image 381
Max Avatar asked Dec 15 '22 13:12

Max


2 Answers

If you wish to use this ADO.NET connector, you will have to specify the architecture for your program. This is because this assembly is a mixed mode assembly - it contains native code - and thus it cannot run under other architectures. If you do not specify an architecture for your executable, the runtime will use a 64-bit instance on 64-bit machines and the referenced assembly will not be loadable.

like image 191
Dark Falcon Avatar answered Jan 06 '23 07:01

Dark Falcon


Install the Nuget package "System.Data.SQLite (x86/x64)" to eliminate this warning.

like image 34
laifukang Avatar answered Jan 06 '23 05:01

laifukang