views:

95

answers:

1

I have a project which I'm trying to port from SQL Server to PostgreSQL. I've got almost everything done I believe except for I can not get DbProviderFactory to work with Npgsql.

Factory = DbProviderFactories.GetFactory("Npgsql");

yields

Unhandled Exception: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.

How do I fix this?

+1  A: 

Have you read section 3.4 "Using Npgsql with ProviderFactory" from the fine manual?

Milen A. Radev
Actually I read it and adding it to machine.config didn't work. I checked and the version that comes with Mono for Arch Linux(2.0.0.0) didn't support it. I upgraded to the latest version and now everything is good
Earlz