SQLite.Ms wants to use System.Data.Sqlite in Release mode
See original GitHub issueI use linq2db and linq2db.SQLite.MS. Compiling to Debug mode does not produce any Error. But on doing this in Release mode, the first time it tries to create a DataConnection it shuts down with the Error below.
Exception message:
System.InvalidOperationException
HResult=0x80131509
Nachricht = Cannot load assembly System.Data.SQLite
Quelle = <Die Ausnahmequelle kann nicht ausgewertet werden.>
Stapelüberwachung:
<Die Ausnahmestapelüberwachung kann nicht ausgewertet werden.>
Stack trace:
at LinqToDB.DataProvider.SQLite.SQLiteProviderAdapter.CreateAdapter(String assemblyName, String clientNamespace, String prefix) in D:\a\1\s\Source\LinqToDB\DataProvider\SQLite\SQLiteProviderAdapter.cs:line 52
at LinqToDB.DataProvider.SQLite.SQLiteProviderAdapter.GetInstance(String name) in D:\a\1\s\Source\LinqToDB\DataProvider\SQLite\SQLiteProviderAdapter.cs:line 78
at LinqToDB.DataProvider.SQLite.SQLiteDataProvider..ctor(String name, MappingSchema mappingSchema) in D:\a\1\s\Source\LinqToDB\DataProvider\SQLite\SQLiteDataProvider.cs:line 32
at LinqToDB.DataProvider.SQLite.SQLiteDataProvider..ctor(String name) in D:\a\1\s\Source\LinqToDB\DataProvider\SQLite\SQLiteDataProvider.cs:line 27
at LinqToDB.DataProvider.SQLite.SQLiteTools.<>c.<.cctor>b__21_0() in D:\a\1\s\Source\LinqToDB\DataProvider\SQLite\SQLiteTools.cs:line 17
at System.Func`1.Invoke()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\shared\System\Lazy.cs:line 324
Steps to reproduce
I use the code below to build my LinqToDbConnectionOptions. Nothing else has been used.
LinqToDB.Common.Configuration.Linq.AllowMultipleQuery = true;
var connectionString = @"Data Source=internal.db";
// create options builder
var builder = new LinqToDbConnectionOptionsBuilder();
// configure connection string
builder.UseSQLite(connectionString);
return builder.Build();
Environment details
linq2db version: 3.1.6 Database Server: ? Database Provider: SQlite MS Operating system: Windows .NET Framework: .Net Standard 2.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
System.Data.SQLite Close() not releasing database file
It does not show my program releasing the db file after the close(). Visual Studio 2010, C#, System.Data.SQLite version 1.0.77.0, Win7. I saw...
Read more >Custom SQLite versions - Microsoft.Data.Sqlite
Learn how to use a custom version of the native SQLite library.
Read more >.NET Core: Introduction To Microsoft.Data.Sqlite
NET Core is evolving. It's still in pre-release mode. Especially when it comes to “Microsoft.Data.Sqlite,” it supports basic functionalities for ...
Read more >Downloads Page
For detailed information about the latest downloads for each Microsoft Visual C++ Runtime Library release, please refer to the following page:.
Read more >How do I add sqlite in the visual studio 2022 data source ...
Short answer, and what I see as the end of the discussion ... SQLite is not a Microsoft product.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s sucks. I will try to get rid of this method, but I have no idea how to ensure that we don’t have other APIs, missing from UWP as analyzer tool lies…
BTW, exception generated only from
corert
runtime (Compile with .NET Native tool chain
option enabled for project).