Summary
The find-refs command fails immediately when opening a database produced by analyze:
$ UnityDataTool find-refs out.db -n red -t Texture2D
Error opening database: Connection string keyword 'version' is not supported. For a possible alternative, see https://go.microsoft.com/fwlink/?linkid=2142181.
This was reported on internal Slack but the cause wasn't clear at the time. It reproduces consistently with any analyze database.
Cause
The reference finder builds a SQLite connection string using a legacy keyword (Version=...) from the old System.Data.SQLite provider. The project uses Microsoft.Data.Sqlite, which does not recognize that keyword and throws on open. The analyze/SQLiteWriter path builds its connection string correctly via SqliteConnectionStringBuilder, so only the ReferenceFinder code path is affected.
Fix direction
Build the connection string with SqliteConnectionStringBuilder (matching SQLiteWriter) instead of hand-writing a System.Data.SQLite-style connection string. To be addressed in a follow-up PR.
Repro
UnityDataTool analyze -o out.db -p "*.cf" <ContentDirectory build>
UnityDataTool find-refs out.db -n red -t Texture2D
Related
Related to #44 (refs table work).
Summary
The
find-refscommand fails immediately when opening a database produced byanalyze:This was reported on internal Slack but the cause wasn't clear at the time. It reproduces consistently with any analyze database.
Cause
The reference finder builds a SQLite connection string using a legacy keyword (
Version=...) from the oldSystem.Data.SQLiteprovider. The project usesMicrosoft.Data.Sqlite, which does not recognize that keyword and throws on open. Theanalyze/SQLiteWriterpath builds its connection string correctly viaSqliteConnectionStringBuilder, so only the ReferenceFinder code path is affected.Fix direction
Build the connection string with
SqliteConnectionStringBuilder(matchingSQLiteWriter) instead of hand-writing aSystem.Data.SQLite-style connection string. To be addressed in a follow-up PR.Repro
Related
Related to #44 (refs table work).