I'm trying to add a dependency on an external assembly to an Azure Function developed and published from Visual Studio 2017. On Azure Functions developed on the Portal, I can add dependencies as as normal using #r and referencing a .dll in the Function directory. In Visual Studio, I get "the reference is invalid or unsupported" if I try to reference the same .dll on my local machine (which makes sense), and it doesn't let me reference assemblies not present on my local machine but present in the Function directory (which also makes sense). So the question is, how can I add assembly references to an Azure Function developed on Visual Studio? Am I missing something obvious?
(N.B. there are other reasons prohibiting just copying the function over and developing it entirely on the Portal, so that isn't an option)