Npgsql - the specified method is not supported

This may be somehow related to this other issue related to FNH.

Free NHibernate cannot load MySql.Data from GAC in test debug mode

Typically, I got a simple test that runs the following code first:

FluentConfiguration config = Fluently .Configure() .Database( PostgreSQLConfiguration.Standard.ConnectionString(c => c.FromConnectionStringWithKey("PostgreSQLConnectionString"))) .Mappings(m => m.FluentMappings.AddFromAssemblyOf<MyMapping>()); s_SessionSource = new SessionSource(config); 

When I don't run it in Debug (just run the tests), it works fine.

When I try to debug, I get a NotSupportedException : The second line throws this ( new SessionSource one)

The specified method is not supported. in Npgsql.NpgsqlConnection.GetSchema (String collectionName, String [] restrictions) in C: \ projects \ Npgsql2 \ src \ Npgsql \ NpgsqlConnection.cs: line 970

Why is there an exception in debug throws, but there are no errors when starting without debugging? I am puzzled by this. Please note that when I just run the code, it works fine, it accesses postgre db no prob.

Note that this is not the difference between Release and Debug, its Debug in both cases, but in the first case I run debug, but in the second I run the code without debugging.

EDIT: Found this question: http://pgfoundry.org/forum/message.php?msg_id=1003008 seems to be my exact problem, but only happens when debugging.

+1
source share
1 answer

Npgsql.NpgsqlConnection.GetSchema throws a NotSupportedException when the collectionName argument is unknown. Perhaps you should upgrade to the latest patch that supports the NHibernate test suite.

An exception should be Fluent, but the attached debugger will stop there.

+2
source

All Articles