I am trying to build a solution architecture where I reference a .net project which contains all the code I need for an entity framework ORM which interfaces to a postgres database using the Npgsql provider.
Referencing such a project and making a query works in a console application but not in an azure function project.
Here is a link to a solution containing everything you need to reproduce this error. in ConsoleApp1, a reference to eftest is used and will run to completion without error.
The project named FunctionApp3 is the fail case. A Brand new azure function project targeting .net framework 4.71, referencing the eftest project and querying it. If you try the project, you will get this error.
Of course, when you actually install the Npgsql 4.0.2 package it so desperately craves, it changes to this error.
I thought this was a problem with a binding redirect. so I added an app.config similar to the one existing in the console app. Turns out that azure functions cant use app.config files, so I cant set a binding redirect or a providerName attribute, in the connection string. To the best of my knowledge, keyword port not supported is caused by not setting the providerName in the connection string.
Here is a log of the full rebuild of the azure function project.
Question: How do I get this entity framework project working with an azure function project?
app.config:configSections,entityFramework/providers,connectionStrings/.../providerName. With my limited understanding it looks as if these things would be unknown to the FunctionApp3 project