Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.91k stars 436 forks source link

Error compiling csx function for SendGrid binding #3927

Open soninaren opened 5 years ago

soninaren commented 5 years ago

Repro Steps:

  1. Create a function app that uses csx files
  2. Create function using the timertrigger template
  3. Add #r "SendGrid" at the top of the file.

Error

Function app throws the following exception in the scenario above Metadata file 'SendGrid' could not be found

Source code for an App in Error state: https://github.com/soninaren/sendGridRepro/tree/2a2597f161a20cdf4c90e5836f6e5a0c7db57b41

Workaround

Installing Storage extension seems to resolve the above issue for some reason.

Source code for an App in Error state with workaround: https://github.com/soninaren/sendGridRepro/tree/34b77f9c6a1a791e0d48d7ff739304848a0f0453

JohnReeson commented 5 years ago

Link a duplicate #3637 for reference.

fabiocav commented 5 years ago

@soninaren do you see this issue if you're referencing the metadata file/assembly with the file extension? (i.e. `#r "SendGrid.dll")

soninaren commented 5 years ago

@soninaren do you see this issue if you're referencing the metadata file/assembly with the file extension? (i.e. `#r "SendGrid.dll")

yes, I get the following error if i do so.


run.csx(1,1): warning AF006: The reference 'SendGrid.dll' is invalid. If you are attempting to add a framework reference, please remove the '.dll' file extension.
run.csx(1,1): error CS0006: Metadata file 'SendGrid.dll' could not be found```