Building System.data.sqlite
(1) By michael (mtissington) on 2022-09-11 03:26:13 [source]
I'm trying to build System.Data.SQlite.
I can build the interop, however both
System.data.sqlite.2017 and system.data.sqlite.module.2017 complain with the following error
I'm using "build.bat build.bat ReleaseManagedOnly"
Your project does not reference ".NETFramework,Version=v4.7" framework. Add a reference to ".NETFramework,Version=v4.7" in the "TargetFrameworks" property of your project file and then re-run NuGet restore. System.Data.SQLite.2017
Any ideas please?
(2) By Larry Brasfield (larrybr) on 2022-09-11 04:49:27 in reply to 1 [link] [source]
Have you tried adding a reference to .Net Framework, version 4.7?
(7) By Aask (AAsk1902) on 2023-03-04 15:17:49 in reply to 2 [link] [source]
Have you tried adding a reference to .Net Framework, version 4.7?
What!?
A Net framework is not a DLL that requires a reference, it is a property of the assembly (the exe or dll) that will be built.
(8) By Larry Brasfield (larrybr) on 2023-03-05 21:57:45 in reply to 7 [link] [source]
I made no assertion that a .Net "reference" had to be to a DLL. I was, and remain, unaware that the term is so narrowly defined. I believe that the term refers to an explicit linkage to an object which exposes objects, types and interfaces. I also believe that whoever wrote the error message quoted in post #1 was not misusing the term. It is a term which had been used for years before .Net existed, within the same development team that produced .Net, to denote the same concept.
(3) By mistachkin on 2022-09-11 14:40:54 in reply to 1 [link] [source]
Please also try:
SET NETFX40ONLY=1 CALL build.bat ReleaseManagedOnly
(4.1) By michael (mtissington) on 2022-09-11 15:57:20 edited from 4.0 in reply to 3 [link] [source]
Hmm, almost it's seemed to build -
it built the SQLite.interop.dll but that is all it didn't build System.Data.SQLite.dll or linq
what am I missing?
(5) By mistachkin on 2022-09-13 17:07:40 in reply to 4.1 [link] [source]
When using "ReleaseManagedOnly", it should only build the managed components, and NOT "SQLite.Interop.dll". Are you setting any other environment variables before building?
(6) By pschimmel on 2023-03-04 14:42:28 in reply to 1 [link] [source]
Hi! I do have the same problem. Tried with Visual Studio 2019 and 2022 and from the batch file, on two different machines. No luck so far.
The full message is: Your project does not reference ".NETFramework,Version=v4.7" framework. Add a reference to ".NETFramework,Version=v4.7" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.
The problem appears already when I try to build System.Data.SQlite.Module.2017 or System.Data.SQlite.2017. Although those have no referenced .nuget packages as far as I can see.
The projects themselves have a target framework specified as: <TargetFrameworkVersion>v4.7</TargetFrameworkVersion> Just adding a "TargetFrameworks" tag with net47 did not succeed. I think this is what the message suggests.
In fact I used the unmodified source code from the zip archive, but can't build the dlls.
Any ideas what else I could try?
(9) By mistachkin on 2023-03-06 16:43:23 in reply to 6 [link] [source]
Please try setting the following environment variable: SET NOUSEPACKAGERESTORE=1
(10) By Aask (AAsk1902) on 2023-03-06 22:29:00 in reply to 1 [link] [source]
Is the copy of file UnsafeNativeMethods.cs embedded in sqlite-netFx-source-1.0.117.0.zip up to date?
I am encountering the following errors, all relating to UnsafeNativeMethods.cs.
The type name 'xSessionFilter' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_index_constraint' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_index_orderby' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_index_constraint_usage' does not exist in the type 'UnsafeMethods'
The type name 'sqlite3_module' does not exist in the type 'UnsafeNativeMethods'
The type name 'xDestroyModule' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_module' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_module' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_module' does not exist in the type 'UnsafeNativeMethods'
The type name 'sqlite3_module' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionInput' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionOutput' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionInput' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionOutput' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionFilter' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionFilter' does not exist in the type 'UnsafeNativeMethods'
The type name 'xSessionConflict' does not exist in the type 'UnsafeNativeMethods'
(11) By Aask (AAsk1902) on 2023-03-07 09:11:25 in reply to 10 [link] [source]
All but xDestroyModule appear to be data structures relating to VFS; I searched for xDestroyModule in the documentation and found no results.
(12) By mistachkin on 2023-03-07 19:41:33 in reply to 10 [link] [source]
How are you compiling the source code? Is INTEROP_VIRTUAL_TABLE defined? Is INTEROP_SESSION_EXTENSION defined?
(13.2) By Aask (AAsk1902) on 2023-03-07 21:22:45 edited from 13.1 in reply to 12 [link] [source]
How are you compiling the source code?
I am using VS2019 and compiling for Windows.
Is INTEROP_VIRTUAL_TABLE defined?
Is INTEROP_SESSION_EXTENSION defined?
Searching for the strings (shown in capital in your question(s)) within Visual Studio, I see number of references all preceded by #if.
Therefore, I assume that those configurations are defined elsewhere; perhaps as environment variables? I need some clues as to where I should look.
If those are environment variables, how will the missing structures materialise in UnsafeNativeMethods.cs?
- Do I need to run one or several batch file(s)?
- Before loading the project in Visual Studio?
- If yes, which one(s)?
UPDATE:
Found the location for those configurations in this file:
.\SQLite.Interop\props\SQLite.Interop.2017.props
I need to figure out how to include this in my VS2019 project. Any advice on this?
(14) By anonymous on 2024-01-10 19:08:46 in reply to 13.2 [link] [source]
Does anyone have an update on this? I'm having the exact same error. How do you build the source code in Visual Studio 2022?
(15.1) By Aask (AAsk1902) on 2024-01-11 14:33:04 edited from 15.0 in reply to 14 [link] [source]
Does anyone have an update on this?
I tried ... (many things/ways) ... and failed: gave up in the end.