如何将外部程序集与 Microsoft Azure Function Apps 一起使用? [英] How do I use external assemblies with Microsoft Azure Function Apps?

查看:13
本文介绍了如何将外部程序集与 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:

  1. 打开应用程序的 Kudu 门户.如果您的 Functions 应用的 URL 是 samplefunctions.azurewebsites.net,请转到 samplefunctions.scm.azurewebsites.net.

单击调试控制台菜单并选择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 存储库).转到Function app settings -> 配置持续集成.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆