EF errors when using Azure Functions?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Bugaboo
Posts: 3
Joined: Fri 27 Apr 2018 18:28

EF errors when using Azure Functions?

Post by Bugaboo » Sun 29 Apr 2018 09:46

Hi,

I have a requirement to use DotConnect Postgresql EF from an Azure Function which targets .Net Standard 2.0.

I'm generating the model (database first) using the Wizard but when running the function app I get the errors below.

I've done some experimentation and have observed the following:

- The errors dissappear when I remove the Datamodels that have been generated
- LinqConnect works absolutely fine and I am able to generate a database first model using exactly the same function. The only reason I'm not using LinqConnect is because I need to query JSONB.
- A Console app targetting .Net Standard works perfectly.

Any ideas?

Errors:

Warning: Only got partial types from assembly: FunctionAppExperimentalCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
Exception message: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.Assembly.GetTypes()
at Microsoft.Azure.WebJobs.Host.Indexers.DefaultTypeLocator.FindTypes(Assembly assembly, IEnumerable`1 extensionAssemblies) in C:\projects\azure-webjobs-sdk-rqm4t\src\Microsoft.Azure.WebJobs.Host\Indexers\DefaultTypeLocator.cs:line 120
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: EF errors when using Azure Functions?

Post by Shalex » Tue 01 May 2018 14:40

Could you please upload a test project for reproducing to ftp://ftp.devart.com (credentials: anonymous / yourEmail)?

Post Reply