Azure / Azure/azure-functions-host

System.Linq.Expressions: No coercion operator is defined between types 'System.Object' and 'System.Void'.

Open
#4,413 10 comments 1 reaction 1 assignee Claimed by @pragnagopa View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

i'm trying to convert an existing demo project (graphql server) with custom DI to the new native dependency injection of azure functions but i get a `No coercion operator is defined between types 'System.Object' and 'System.Void'.`

working branch with custom DI: https://github.com/OneCyrus/GraphQL-AzureFunctions-HotChocolate/tree/master

migrated project which gives the error: https://github.com/OneCyrus/GraphQL-AzureFunctions-HotChocolate/tree/feat_nativeDI

#### Investigative information

local dev environment

Azure Functions Core Tools (2.7.1158 Commit hash: f2d2a2816e038165826c7409c6d10c0527e8955b)
Function Runtime Version: 2.0.12438.0

#### Repro steps

1. checkout this branch and start the project. https://github.com/OneCyrus/GraphQL-AzureFunctions-HotChocolate/tree/feat_nativeDI
2. calling the function at http://localhost:7071/api/graphql
3. gives the following error

```
[13.05.2019 19:15:13] An unhandled host error has occurred.
[13.05.2019 19:15:13] System.Linq.Expressions: No coercion operator is defined between types 'System.Object' and 'System.Void'.
```

checking out the master with custom DI works fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.