{"record":{"id":"d5fdeffdf5164900","repo":"tursodatabase/turso","slug":"1-d5fdef","errorCode":"1","errorMessage":"SQLite Error {errorCode}: 'no such vfs: {vfs}'.","messagePattern":"SQLite Error (.+?): 'no such vfs: (.+?)'\\.","errorType":"exception","errorClass":"SqliteException","httpStatus":null,"severity":"error","filePath":"bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs","lineNumber":733,"sourceCode":"        return true;\n    }\n\n    private static void SkipSqlWhitespace(string sql, ref int index)\n    {\n        while (index < sql.Length && char.IsWhiteSpace(sql[index]))\n            index++;\n    }\n\n    private static bool IsSqlIdentifierPart(char value)\n        => char.IsLetterOrDigit(value) || value == '_' || value == '$';\n\n    private static string NormalizeDataSource(SqliteConnectionStringBuilder options)\n    {\n        var dataSource = options.DataSource;\n        if (string.IsNullOrEmpty(dataSource))\n            return \":memory:\";\n        if (options.Vfs is { Length: > 0 } vfs && !IsSupportedVfs(vfs))\n            throw new SqliteException(Properties.Resources.SqliteNativeError(SQLITE_ERROR, \"no such vfs: \" + vfs), SQLITE_ERROR);\n        if (dataSource == \":memory:\")\n            return dataSource;\n        if (options.Mode == SqliteOpenMode.Memory)\n            return options.Cache == SqliteCacheMode.Shared && dataSource.Length > 0\n                ? GetSharedMemoryFile(dataSource)\n                : \":memory:\";\n        if (dataSource.StartsWith(\"file:\", StringComparison.OrdinalIgnoreCase))\n            return NormalizeUriDataSource(dataSource);\n\n        const string dataDirectory = \"|DataDirectory|\";\n        if (dataSource.StartsWith(dataDirectory, StringComparison.OrdinalIgnoreCase))\n        {\n            var baseDirectory = AppDomain.CurrentDomain.GetData(\"DataDirectory\") as string\n                                ?? AppContext.BaseDirectory;\n            dataSource = Path.Combine(baseDirectory, dataSource[dataDirectory.Length..].TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar));\n        }\n\n        var filename = Path.IsPathRooted(dataSource)","sourceCodeStart":715,"sourceCodeEnd":751,"githubUrl":"https://github.com/tursodatabase/turso/blob/244cde92a7df7f9b8b8b7a4075c35a12977e303e/bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs#L715-L751","documentation":"Thrown while normalizing the connection string when the 'Vfs' keyword is non-empty but not one of the two VFS names this managed binding accepts: 'win32-longpath' or 'unix-dotfile' (see IsSupportedVfs in SqliteConnection.cs:789). The message mirrors SQLite's native 'no such vfs' error with SQLite error code 1 (SQLITE_ERROR). Unlike Microsoft.Data.Sqlite, which forwards the name to the native library where many VFS modules exist, this binding validates the name itself and fails before any database is opened.","triggerScenarios":"Constructing SqliteConnection with a connection string containing 'Vfs=unix-excl' (or 'unix', 'win32', 'unix-none'), or setting builder.Vfs = \"unix-excl\". Anything except 'win32-longpath' and 'unix-dotfile' (case-insensitive) throws from NormalizeDataSource.","commonSituations":"Copying a connection string written for Microsoft.Data.Sqlite or System.Data.SQLite whose bundled native SQLite supports more VFS names; attempting long-path or dot-file locking workarounds copied from SQLite docs; migrating an app to the Turso managed binding without pruning unsupported options.","solutions":["Remove the 'Vfs=' entry from the connection string; it is optional and the binding uses its own virtual file system.","If you need the behavior it provided, use one of the two accepted values: Vfs=win32-longpath (Windows long paths) or Vfs=unix-dotfile (dot-file locking).","Search your config files, appsettings, and ORM setup (e.g. UseSqlite(\"...\")) for 'Vfs=' and delete or correct every occurrence."],"exampleFix":"// before\nvar conn = new SqliteConnection(\"Data Source=app.db;Vfs=unix-excl\");\n\n// after\nvar conn = new SqliteConnection(\"Data Source=app.db\");\n// or, if dot-file locking is specifically wanted:\nvar conn = new SqliteConnection(\"Data Source=app.db;Vfs=unix-dotfile\");","handlingStrategy":"validation","validationCode":"static readonly string[] SupportedVfs = { \"win32-longpath\", \"unix-dotfile\" };\nstatic bool VfsOk(string? vfs)\n    => string.IsNullOrEmpty(vfs)\n    || SupportedVfs.Contains(vfs, StringComparer.OrdinalIgnoreCase);\n\nif (!VfsOk(config.Vfs)) throw new ConfigException($\"Unsupported Vfs '{config.Vfs}'.\");","typeGuard":null,"tryCatchPattern":"try { conn.Open(); }\ncatch (SqliteException ex) when (ex.SqliteErrorCode == 1 && ex.Message.Contains(\"no such vfs\"))\n{ /* strip Vfs from the connection string and rebuild */ }","preventionTips":["Do not set Vfs unless you specifically need win32-longpath or unix-dotfile behavior.","Keep connection strings in one config source and review them when switching SQLite provider packages."],"tags":["csharp","dotnet","sqlite","connection-string","vfs"],"backgroundTag":"no-such-vfs","analyzedSha":"244cde92a7df7f9b8b8b7a4075c35a12977e303e","analyzedAt":"2026-08-20T07:02:18.389Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}