Skip to content

File not found exception when loading assembly from function with double underscore #2969

@paulbatum

Description

@paulbatum

Repro steps

  1. Create a C# function with two consecutive underscores in the name such as HttpTriggerCSharp__3.
  2. Modify the function to load an assembly using #r such as #r "../bin/MyLibrary.dll"
  3. Upload given library to the function app so that it should work

Expected behavior

Library is loaded

Actual

[Error] Exception while executing function: Functions.HttpTriggerCSharp__3. mscorlib: Exception has been thrown by the target of an invocation. f-HttpTriggerCSharp__3__576737419: Could not load file or assembly

Workaround

Avoid using function names with double underscores

Notes

This bug does not exist in functions V2.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions