{"record":{"id":"f487e14fe355015b","repo":"tursodatabase/turso","slug":"custom-extension-entry-points-are-not-yet-supporte","errorCode":null,"errorMessage":"Custom extension entry points are not yet supported by the Turso SQLite-compatible provider.","messagePattern":"Custom extension entry points are not yet supported by the Turso SQLite-compatible provider\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs","lineNumber":465,"sourceCode":"    public virtual void CreateAggregate<TAccumulate, TResult>(string name, TAccumulate seed, Func<TAccumulate, object?[], TAccumulate>? func, Func<TAccumulate, TResult>? resultSelector, bool isDeterministic = false)\n    {\n        RegisterAggregateFunction(name, -1, isDeterministic, seed, func is null ? null : (accumulator, args) => InvokeSeededAggregateStep(func, accumulator, args), accumulator => InvokeResultSelector(resultSelector!, accumulator));\n    }\n\n    public virtual void EnableExtensions(bool enable = true)\n    {\n        ThrowIfManagedLocalOnly(nameof(EnableExtensions));\n        _extensionsEnabled = enable;\n        if (_database is not null)\n            TursoBindings.EnableLoadExtension(DatabaseHandle, enable);\n    }\n\n    public virtual void LoadExtension(string file, string? proc = null)\n    {\n        ThrowIfManagedLocalOnly(nameof(LoadExtension));\n        ArgumentNullException.ThrowIfNull(file);\n        if (proc is not null)\n            throw new NotSupportedException(\"Custom extension entry points are not yet supported by the Turso SQLite-compatible provider.\");\n\n        if (_database is null)\n        {\n            _pendingExtensions.Add((file, proc));\n            return;\n        }\n\n        LoadExtensionCore(file, proc);\n    }\n\n    public virtual void BackupDatabase(SqliteConnection destination)\n        => BackupDatabase(destination, \"main\", \"main\");\n\n    public virtual void BackupDatabase(SqliteConnection destination, string destinationName, string sourceName)\n    {\n        ThrowIfManagedLocalOnly(nameof(BackupDatabase));\n        if (_database is null)\n            throw new InvalidOperationException(Properties.Resources.CallRequiresOpenConnection(\"BackupDatabase\"));","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/tursodatabase/turso/blob/6c7252267988c76e632af00a671e4b9788dfae13/bindings/dotnet/src/Turso.Data.Sqlite/SqliteConnection.cs#L447-L483","documentation":"LoadExtension(file, proc) throws NotSupportedException whenever the proc argument is non-null: the Turso provider cannot load extensions through a custom named entry point, only through the default one an extension exports (sqlite3_extension_init / sqlite3_<name>_init). The check happens before any file is touched, so the extension is never loaded. Passing proc: null (or omitting it) takes the normal path (immediate or pending until open).","triggerScenarios":"Porting code from Microsoft.Data.Sqlite/System.Data.SQLite that loads an extension with an explicit entry point, e.g. LoadExtension(\"uuid\", \"sqlite3_uuid_init\"); loading extensions whose docs instruct a custom proc because their export is non-standard; generic extension loaders that always pass an entryPoint value.","commonSituations":"Migrating an app that used spellfix/uuid/crypto extensions with named entry points, build scripts shared across providers that pass proc uniformly, and third-party extension docs that assume the official SQLite API contract.","solutions":["Omit the proc argument so the default entry point is used: conn.LoadExtension(\"path/to/ext\").","If the extension exports a truly non-default name, rebuild/relink it to export sqlite3_extension_init (or sqlite3_<name>_init) so the default resolution finds it.","Enable extensions first with conn.EnableExtensions(true) if loading has not been enabled yet."],"exampleFix":"// before\nconn.EnableExtensions(true);\nconn.LoadExtension(\"uuid\", \"sqlite3_uuid_init\"); // throws: custom entry points not supported\n\n// after\nconn.EnableExtensions(true);\nconn.LoadExtension(\"uuid\"); // default entry point","handlingStrategy":"validation","validationCode":"static void LoadExtensionDefaultEntryPoint(SqliteConnection conn, string file)\n{\n    conn.EnableExtensions(true);\n    conn.LoadExtension(file); // never pass proc; default entry point only\n}","typeGuard":null,"tryCatchPattern":"null","preventionTips":["Audit ported LoadExtension calls for a second argument and drop it.","Verify the extension binary exports sqlite3_extension_init (or sqlite3_<name>_init).","Wrap extension loading in one helper so the proc contract is enforced in a single place."],"tags":["ado-net","sqlite","turso","extensions","unsupported-feature"],"backgroundTag":"unsupported-provider-feature","analyzedSha":"6c7252267988c76e632af00a671e4b9788dfae13","analyzedAt":"2026-09-06T07:15:26.990Z","contentChangedAt":"2026-09-06T07:15:26.990Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}