I tried to use the Npsql client for cratedb as described in the docs with a minimum example. I have a three-node-cluster running with a docker image on localhost.
Executed file with the code copy-pasted from the docs
using Npgsql;
using Npgsql.CrateDb;
namespace CrateHelloWorld
{
class Program
{
static void Main(string[] args)
{
NpgsqlDatabaseInfo.RegisterFactory(new CrateDbDatabaseInfoFactory());
var connString = "Host=127.0.0.1;Username=crate;SSL Mode=Prefer";
using (var conn = new NpgsqlConnection(connString))
{
conn.Open();
}
}
}
}
However conn.Open() always throws an exception
An unhandled exception of type 'System.MissingMethodException' occurred in System.Private.CoreLib.dll: 'Method not found: 'Void Npgsql.NpgsqlDatabaseInfo..ctor()'.'
I only got it running when downgrading Npgsql to version 4.0.10.
This should be written somewhere as it is really frustrating to not get a hello world running :)
@PhilippJust Thanks for your valuable feedback! We definitely want our tutorials to be a smooth process and will file an issue and update the docs soon.
Documentation feedback
I tried to use the Npsql client for cratedb as described in the docs with a minimum example. I have a three-node-cluster running with a docker image on localhost.
Here is the very simple console app
.csproj
file:Executed file with the code copy-pasted from the docs
However
conn.Open()
always throws an exceptionAn unhandled exception of type 'System.MissingMethodException' occurred in System.Private.CoreLib.dll: 'Method not found: 'Void Npgsql.NpgsqlDatabaseInfo..ctor()'.'
I only got it running when downgrading Npgsql to version 4.0.10. This should be written somewhere as it is really frustrating to not get a hello world running :)