Skip to content

DuckDBConnection.Open Throwing 'The type initializer for 'DuckDB.NET.Data.DuckDBConnectionStringBuilder' threw an exception.' #241

@TheLastArchive

Description

@TheLastArchive

I've tried with the two different NuGet packages 'DuckDB.NET.Data.Full' and 'DuckDB.NET.Bindings.Full'

When I attempt to open the DuckDB connection like so:
using (var connection = new DuckDBConnection("DataSource=:memory:")) { connection.Open(); ... }

I get the exception listed in the title:

The type initializer for 'DuckDB.NET.Data.DuckDBConnectionStringBuilder' threw an exception.

I've followed along in the debugger and here is where everything goes wrong in DuckDBConnection.cs

internal DuckDBConnectionString ParsedConnection => parsedConnection ??= DuckDBConnectionStringBuilder.Parse(ConnectionString);

ConnectionString is set to DataSource=:memory:

I tried following a similar issue that's been closed out and didn't really resolve my issue. Is there any additional setup that I may be missing? I followed the documentation to the best of my ability .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions