I have created new ASP.NET Core Web Application and used ASP.NET Core 2.1 cross platform framework.
Next, I added System.Data.SQLite.Core using Nuget manager. It's the official SQLite database engine for both x86 and x64 along with the ADO.NET provider.
My Main method
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
SQLiteConnection con = new SQLiteConnection("abc");
}
When I run the application, it's trying to search for 1.0.109.0 instead of installed 1.0.109.1 version.
So end up throwing below exception as expected
System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'System.Data.SQLite, Version=1.0.109.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139'. The system cannot find the file specified. Source=
So, why it's searching for wrong version?
Screenshots for reference
My Solution platform is "Any CPU" and I'm running on a x64 Windows 7 on an x64
Strange
When I do F12 on SQLiteConnection class, it goes to
My .csproj file conent
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.109.1" />
</ItemGroup>



