Azure / Azure/azure-functions-host

FileNotFoundException: Could not load file or assembly for Function app referencing custom assembly

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

Description

I'm running Host from the latest sources of `dev` branch as described in [Running locally (Visual Studio) (v2+)](https://github.com/Azure/azure-functions-host/blob/dev/CONTRIBUTING.md#running-locally-visual-studio-v2).

I'm pointing to my test Function App which consists of two C# projects: `FunctionApp` and it references a library `Lib`. When I start debugging and call the function, I get

> FileNotFoundException: Could not load file or assembly 'Lib...

![image](https://user-images.githubusercontent.com/1454008/41097611-de4dfc48-6a58-11e8-8cc4-71e147d7cea1.png)

If I remove the reference of library and all usages, the functions runs just fine.

It seems to be a recent regression, since the exact same project works fine when I checkout `v2.0.11651-alpha`. `v2.0.11737-alpha` already fails.

Function App is referencing `Microsoft.NET.Sdk.Functions` version `1.0.13`, and is just a basic app with 1 HTTP function.

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.