I don’t want to modify my machine.config, but I want to use the Npgsql library as a data provider. I will deploy my application to multiple platforms (including mono) so I would really like the thing to “just work” instead of giving me the error “Unable to find the requested .Net Framework Data Provider.”
Is there a way to “register” Npgsql as a data provider at runtime so this does not happen?
I should clarify that Npgsql works fine without it being in my machine.config for most things, but there are some it does not work well for (like NLog — the current source of my frustration).
I found out how to do what I needed done; it’s not quite “runtime” but close enough and I didn’t have to modify my machine.config. I added this section to my web.config file:
…and it started working like a champ.