如何将外部程序集与 Microsoft Azure Function Apps 结合使用? [英] How do I use external assemblies with Microsoft Azure Function Apps?
问题描述
文档 说你可以把bin
文件夹中的 DLL 并使用特殊的 #r
语法引用它,但是在 Azure 门户中我找不到如何上传这些 DLL.这可能吗,如果可能,应该如何实现?
The documentation says that you can put a DLL in a bin
folder and reference it using a special #r
syntax, however in the Azure portal I cannot find how to upload these DLLs. Is this possible, and if so, how is that supposed to be accomplished?
推荐答案
这是可能的.
您可以使用 Kudu 上传二进制文件:
You can use Kudu to upload your binaries:
打开应用程序的 Kudu 门户.如果您的 Functions 应用的 URL 是
samplefunctions.azurewebsites.net
,请转到samplefunctions.scm.azurewebsites.net
.
点击Debug console
菜单并选择PowerShell
.这将打开一个 PowerShell 控制台和一个文件浏览器.导航到 D:homesitewwwroot
.
Click on the Debug console
menu and select PowerShell
. This will open up a PowerShell console plus a file explorer. Navigate to D:homesitewwwroot
.
在那里您应该会看到一个以您现有函数命名的文件夹.导航到该文件夹并将您的二进制文件拖放到 bin
文件夹中.
There you should see a folder which is named after your existing function. Navigate to that folder and drag-n-drop your binaries inside bin
folder.
现在您可以将它们与 #r
指令一起使用.
Now you can use them with #r
directive.
我认为您还应该能够将库的持续部署配置为 Functions(例如,从 Git 存储库).转到功能应用设置
-> 配置持续集成
.
I think you should also be able to configure the continuous deployment of your libraries to Functions (e.g. from a Git repo). Go to Function app settings
-> Configure Continuous Integration
.
这篇关于如何将外部程序集与 Microsoft Azure Function Apps 结合使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!