Azure / Azure/azure-functions-host

Could not load assembly - DocumentDB Core in Functions - w. .NET Core

Open
#2,081 0 comments 5 reactions 1 assignee Claimed by @fabiocav View on GitHub
2.x bug
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

Hi,
I'm running a .Net Core 2.0 function, using timer trigger.
The function starts correctly but the I get the following error..
(I'm getting the same error also for other libraries.. e.g. RazorLight..)

```
Exception during runtime resolution of assembly 'Microsoft.Azure.DocumentDB.Core, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35': 'System.InvalidCastException: [A]System.AppDomain cannot be cast to [B]System.AppDomain. Type A originates from 'System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0\System.Private.CoreLib.dll'. Type B originates from 'System.Runtime.Extensions, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' in the context 'Default' at location 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0\System.Runtime.Extensions.dll'.
[31.10.2017 15:19:15] at Microsoft.Azure.WebJobs.Script.Description.FunctionAssemblyLoader.ResolveAssembly(Object sender, ResolveEventArgs args)'
[31.10.2017 15:19:15] Unable to find assembly 'Microsoft.Azure.DocumentDB.Core, Version=1.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Are you missing a private assembly file?
```

Azure Functions Core Tools (2.0.0)
Function Runtime Version: 2.0.11308.0

Appreciate any guidance or help.., thanks!

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.